Bug 86762 - Using -fstack-protector-all causes SIGSEV with gcc-8
Summary: Using -fstack-protector-all causes SIGSEV with gcc-8
Status: RESOLVED DUPLICATE of bug 85644
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 8.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2018-07-31 19:28 UTC by Shane
Modified: 2018-08-02 17:50 UTC (History)
0 users

See Also:
Target: x86_64-apple-darwin17.7.0
Known to work:
Known to fail:
Last reconfirmed:

Intermediate file (107 bytes, text/plain)
2018-07-31 19:28 UTC, Shane

Note You need to log in before you can comment on or make changes to this bug.
Description Shane 2018-07-31 19:28:24 UTC
Created attachment 44474 [details]
Intermediate file

Using gcc-8 from brew on macOS 10.13.6 a simple main program causes SIGSEV with -fstack-protector-all. We have confirmed this is not the case using gcc-7 and is only an issue on macOS (didn't check other versions of the OS).

The program is just as follows:
int main (int argv, char **arc)
    (void) argv;
    (void) argc;
    return 0;

compiled with:
gcc-8 main.c -O3 -o tst -Wall -Wextra -fstack-protector-all --save-temps

fish: './tst' terminated by signal SIGSEGV (Address boundary error)

gcc-8 -v:
Using built-in specs.
Target: x86_64-apple-darwin17.7.0
Configured with: ../configure --build=x86_64-apple-darwin17.7.0 --prefix=/usr/local/Cellar/gcc/8.2.0 --libdir=/usr/local/Cellar/gcc/8.2.0/lib/gcc/8 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-8 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-checking=release --with-pkgversion='Homebrew GCC 8.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-nls
Thread model: posix
gcc version 8.2.0 (Homebrew GCC 8.2.0)
Comment 1 Andrew Pinski 2018-08-02 17:50:58 UTC
Dup of bug 85644.

*** This bug has been marked as a duplicate of bug 85644 ***