[cfe-users] My compiler crashes .... but the online godbolt one doesn't ?!

Andy Gibbs via cfe-users cfe-users at lists.llvm.org
Wed Dec 12 01:30:50 PST 2018


On 10 December 2018 18:17, David Blaikie wrote:
Possible that the online one isn't built with assertions enabled (you could test this with other known crashers to see if they reproduce on godbolt with assertion crash dumps or only with raw segfaults)? If that's the case,t hen it's possible that the codepath that should assert continues on and perhaps either has unexpected or even undefined behavior but not a crash.
Yes, it seems this is right.  I have done a number of further tests and it seems that the godbolt compilers are built without asserts.

This, however, is a possible problem generally, isn't it?  I build my compilers always with release-asserts but I would guess it common that compiler builds are simply release builds.  And this means, if there is a bug in the compiler, it may generate invalid code with no warning at all (my bug report gives an example of this) where in fact, if it were built with asserts then the bug would have been made visible (and maybe fixed!).

I know there can always be bugs which still act invisibly, but given that clang is good at sticking asserts everywhere in its code :o) isn't it worth ensuring asserts are always enabled?  i.e. build 'release-asserts' even when asked to do a release build?

Cheers,
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20181212/554403d9/attachment.html>


More information about the cfe-users mailing list