The Chromium source contains several instances of calls via a NULL pointer. This is of course invalid C++, but the real issue is that gcc happily optimizes away code, because it can assume that "this" can never be NULL. The result of this optimization are potential crashes. See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68853 for an example And: https://bugs.chromium.org/p/v8/issues/detail?id=3782 To fix this issue -fno-delete-null-pointer-checks should be added to the CXXFLAGS. Gcc then retains these checks, instead of optimizing them away. Reproducible: Always
Is there an actual specific crash caused by this? I tend to stay as close to upstream as possible, and users are free to add any flags to their CXXFLAGS.
Yes, see the gcc bug link. If you compile Chromium with upcoming gcc-6 it will crash almost immediately at startup. But every other compiler also have the right to optimize the NULL pointer checks away, because undefined behavior is invoked. Upstream doesn't seem to care about gcc, but most Gentoo users will use gcc, so -fno-delete-null-pointer-checks will avoid needless browser crashes...
If there's an actual crash with gcc-6, could you file an upstream bug and reference it here?
Feel free to reopen after providing info requested above.