clang makes segfaulting code with -march=core2 on i386

Andrey Chernov ache at freebsd.org
Sat Sep 13 18:01:03 UTC 2014


On 13.09.2014 20:45, Dimitry Andric wrote:
> After some massaging of gcc's source to disable its built-in segfault
> handlers, I get this backtrace:

Do you get this with my core or finally able to reproduce it by yourself?

> I think it's most likely this is some type of undefined behavior in gcc,
> which leads to randomly corrupted tree values.  Of course, it could also
> be a clang bug, but I don't see any "64-bit" instructions in there at
> all.
> 
> This needs to be investigated further, but it's very hard to understand
> what is going on the guts of gcc's parser.  Let alone to reduce this to
> some sort of reproducible test case.

By first glance I see a lots of <optimized out> things. It is known that
in edge cases gcc preserves more "unused" values than clang. It can be
the possible case. I'll try to lower -O level preserving -march=core2
and see.

-- 
http://ache.vniz.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20140913/d5abd89d/attachment.sig>


More information about the freebsd-toolchain mailing list