GCC i386 stack misalignment: [package - head-i386-default][graphics/rawtherapee-devel] Failed for rawtherapee-devel-5.0 in stage
Matthias Andree
mandree at FreeBSD.org
Sun Jan 29 18:36:14 UTC 2017
Greetings,
whenever I've traced one of the attached SIGBUS issues on gcc-compiled
i386 code with SSE2, I found that it was using unaligned 128-bit =
16-byte wide SSE2 access which also needs 16-byte aligned data
(including stacks).
For rawtherapee in particular, the crash happens in one of the C++
constructors that don't do anything beyond initializing an auto
double[8] = { ... } vector and then create STL containers from the vector.
Please see BZ#216563 here for more details:
<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216563>
While I don't think there's anything special about the attached case, it
does involve callbacks through Gtkmm and all its requisites, but never
shows up when the code is compiled with Clang.
Please investigate why GCC-compiled -msse2 code on i386 is prone to
insufficiently aligned stacks. I can't do it, am not knowledgable about
compiler innards and only see the high-level difference "gcc fucks up,
clang compiles usable code".
WRT rawtherapee, I'm fed up with the compiler generating nonworking code
and force -mstackrealign on i386, and I've pulled the plug on any
non-amd64 stuff on FreeBSD12+ because I don't have time to sort this
mess out.
(The interesting question is why 12-CURRENT i386 uses GCC, rather than
clang. Some of the Uses/compiler.mk logic must be hosed there, assuming
that the 12-CURRENT base compiler can't fully do c++11. If it really
can't do that, we should make it.)
-------------- next part --------------
An embedded message was scrubbed...
From: pkg-fallout at FreeBSD.org
Subject: [package - head-i386-default][graphics/rawtherapee-devel] Failed for rawtherapee-devel-5.0 in stage
Date: Sun, 29 Jan 2017 17:03:42 GMT
Size: 43555
URL: <http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20170129/c6ebec25/attachment.eml>
More information about the freebsd-toolchain
mailing list