Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2017 01:57:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 216563] lang/gcc5: lang/gcc: stack alignment insufficient on i386 for SSE2 code.
Message-ID:  <bug-216563-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216563

            Bug ID: 216563
           Summary: lang/gcc5: lang/gcc: stack alignment insufficient on
                    i386 for SSE2 code.
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: gerald@FreeBSD.org
          Reporter: mandree@FreeBSD.org
          Assignee: gerald@FreeBSD.org
             Flags: maintainer-feedback?(gerald@FreeBSD.org)

GCC 5.4.0 and also 4.9.0 from ports fail to generate working code for
rawtherapee, a C++11 application, and cause it to drop core with a SIGBUS on
i386. This is with -O3 -msse2.=20=20

amd64 is unaffected. Other architectures are untested. GCC 6 and 7-devel are
untested.

To reproduce, compile ports/heads/graphics/rawtherapee-devel as of r432608
(exactly this version!), add "CFLAGS+=3D-g" and "STRIP=3D" to the Makefile =
and see
that it is hit by a SIGBUS in post-install when it tries to check if the
program is able to start. DO NOT USE WITH_DEBUG=3Dyes, that will change com=
piler
flags and mask the bug!

Debugging this reveals that the generated code crashes when initalizing an =
auto
double[8] =3D { ... } vector upon entry to the function, when it tries to c=
opy it
around with SSE instructions that require 16-byte alignment, but the source
address has some 0x...8 address. This affects i386 on 10.3-RELEASE and
11.0-RELEASE (both fully patched).

I am reporting this against GCC because this does NOT happen when the code =
is
recompiled with base clang (3.4.0 for FreeBSD 10.3, or 3.8.0 for FreeBSD 11=
.0.)
without changing anything else on the system (in particular, gdk, gtk, ... =
are
NOT touched when switching compilers).

Workaround: add -mstackrealign.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-216563-13>