-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why evmone crash when invoke? #868
Comments
It is likely something is not properly initialized around state / host / transaction. |
You should return it by reference For later, can you send code as text instead of images? |
Thanks for remind. However, the base class in <evmone.hpp> require that the return type must be |
Ah sorry, you are right. It will keep the copy as Can you send a test reproducing your problem? |
It's a bit difficult to provide test, because I am using online client to run it.... However, I can provide my code around it. SimulateHost |
I don't know. Maybe you want to try address sanitizer or valgrind to provide more debug information? |
const evmc_tx_context& get_tx_context() noexcept
{
std::cout << "[get_tx_context] Function called." << std::endl;
std::cout << "this:" << this << std::endl;
if (INTX_UNLIKELY(m_tx.block_timestamp == 0)) {
std::cout << "[get_tx_context] Block timestamp is zero, fetching new tx context." << std::endl;
m_tx = host.get_tx_context();
}
else {
std::cout << "[get_tx_context] Block timestamp is not zero." << std::endl;
}
std::cout << "[get_tx_context] Returning tx context : " << &m_tx << std::endl;
std::cout << "this:" << this << std::endl;
return m_tx;
} It turnout that this point change to 0x0 after calling |
The |
only call the function but not set "m_tx" doesn't make the error
|
When I compile with -O0, no crash happens.... Maybe the bug of compiler... |
@chfast Hi, brother. I change the return value of the function |
I am running on ubuntu arm, please help me.
The text was updated successfully, but these errors were encountered: