-
Notifications
You must be signed in to change notification settings - Fork 49
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
curPeEvent reference causes SEGFAULT #3832
Comments
Is this Charm built with |
No. I suspect that adding |
I don't think it should be possible to get that line without having built Charm with
I am not able to replicate the issue on a |
The SEGV occurs in the function in the *.def.h file which calls _TRACE_BEGIN_EXECUTE_DETAILED(). If the function is not optimized out and the inline is ignored, the compiler has to get the event parameter to pass to this function, which causes the SEGV. I expect it to be very compiler dependent (I am using gcc v11.2.0, see N-BodyShop/changa#178 ), since it depends on how a compiler deals with an empty inline function. |
I see now. Our code generation doesn't check if tracing is enabled and Two solutions I can see would be either 1) we change the generated code to check if tracing is enabled, or 2) we move the initialization of Also a workaround for this issue, if it is blocking you, would be to declare the entry method as |
@trquinn did the workaround work for you? |
If I recall, the workaround did work for us. |
If charm is built with
--with-production
and an application with a [local] or [inline] entry method is compiled with -O0, the_TRACE_BEGIN_EXECUTE_DETAILED(CpvAccess(curPeEvent), ...
call in the CProxyElement call does not get optimized out, butcurPeEvent
is not initialized, resulting in a NULL pointer access.The text was updated successfully, but these errors were encountered: