Jon A. Cruz schrieb:
I was chasing this down the other night with a few others. We narrowed it down to only happening when -O2 was used with the build, but not -O0. In other words it was only showing up with optimizations on.
I didn't experience that crash because I usually build without optimization. But since I did a whole number of commits around the date when the crash was introduced, I now did a fresh checkout and rebuilt with -O2. With this build, I was able to reproduce the crash and thus to bisect the history to track it down.
It turned out that the culprit commit was indeed one of mine, namely rev. 19690. But I totally don't understand what's causing it. I committed a "fix" (of which I don't understand why it works) in rev. 19744. Everyone is invited to take a look at it because I'm at a loss with this. Basically, what fixed the issue was that I moved the following line
mc = SP_NODE_CONTEXT(ec)->_node_message_context;
from the function get_message_context() at the beginning of nodepath.cpp to its original (pre-19690) locations in line 3930 and line 4762. But i didn't change the line itself, and I did check that it really was executed in the case distinction in get_message_context(). So there shouldn't be any difference in functionality whatsoever.
Can anyone please confirm that this really fixes the issue? And perhaps even provide an explanation? Is this a compiler bug which should be reported upstream? I will be away for one and a half weeks so if there are any further issues feel free to mess with the code yourself.
Regards, Max