You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently this still undefined behaviour, and recent GCC versions assume this to be non-null and optimize this check away, with a warning: include/antlr3cpp/antlr3bitset.inl:54:2: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
~~The only workaround I see is probably to manually change every line where bitsetLoad() might be called with a NULL pointer. ~~
The GCC 6 Release Notes describe this issue as a consequence of Value range propagation, -fno-delete-null-pointer-checks can be used as a compiler flag to keep the old code working.
There is a potential null pointer dereference here: https://github.com/antlr/antlr3/blob/master/runtime/Cpp/include/antlr3exception.inl#L315
m_expectingSet is very often null. It should be checked before doing anything with this pointer.
Currently it leads to undefined behaviour and sometimes crashes of the whole program.
The text was updated successfully, but these errors were encountered: