LLNL/MACSio

segfault with intel compiler

Closed this issue · 1 comments

MACSIO_KnownArgInfo_t *newArg, *oldArg;

The way this code is written triggers an segfault (null pointer dereference later in the loop) with intel compiler due to undefined behavior of the language. gnu does not reinitialize recurring variable declaration, however intel does, so the linked line will reset both pointers to NULL in every iteration!

Best,
Jens

Thanks for pointing this out. Oversight. Those vars should have been declared outside the loop. And, it looks like in my git naievety, I wound up fixing on master.