[Bug c++/94493] New: FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if building ftp/filezilla

2020-04-05 Thread gcc-bugs at opsec dot eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94493

Bug ID: 94493
   Summary: FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if
building ftp/filezilla
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gcc-bugs at opsec dot eu
  Target Milestone: ---

Created attachment 48200
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48200&action=edit
output of test-compile

ftp/filezilla is at version 3.40.0 in the FreeBSD ports tree.

As maintainer for that port, I try to update to 3.47.2.1, but all newer
versions fail to compile, because the g++9 used (lang/gcc9) crashes.

The generated *.i* file is empty (!)

-rw---  1 pi  wheel  83460096 Apr  5 22:30 cc1plus.core
-rw-rw-r--  1 pi  wheel 0 Apr  5 22:30 engine_context.ii

The coredump can be found at:

https://opsec.eu/backup/cc1plus.core

The script to run the compile is attached, as well as the output.

[Bug c++/94493] FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if building ftp/filezilla

2020-04-05 Thread gcc-bugs at opsec dot eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94493

--- Comment #1 from Kurt Jaeger  ---
Created attachment 48201
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48201&action=edit
the compile script

The compile script

[Bug c++/94493] FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if building ftp/filezilla

2020-04-05 Thread gcc-bugs at opsec dot eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94493

--- Comment #2 from Kurt Jaeger  ---
An attempt to produce a reduced test case failed.

Even commenting the first line of of the first include in engine_context.cpp
cause a crash.

FreeBSD version:
FreeBSD fc.opsec.eu 13.0-CURRENT FreeBSD 13.0-CURRENT #1 r359631M: Sun Apr  5
01:05:13 CEST 2020 
p...@fc.opsec.eu:/usr/obj/usr/src/amd64.amd64/sys/GENERIC 
amd64

[Bug c++/94493] FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if building ftp/filezilla

2020-04-05 Thread gcc-bugs at opsec dot eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94493

--- Comment #3 from Kurt Jaeger  ---
g++9 -v
Using built-in specs.
COLLECT_GCC=g++9
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc9/gcc/x86_64-portbld-freebsd13.0/9.3.0/lto-wrapper
Target: x86_64-portbld-freebsd13.0
Configured with: /wrkdirs/usr/ports/lang/gcc9/work/gcc-9.3.0/configure
--enable-multilib --enable-plugin --with-build-config=bootstrap-debug
--disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc9
--libexecdir=/usr/local/libexec/gcc9 --program-suffix=9
--with-as=/usr/local/bin/as --with-gmp=/usr/local
--with-gxx-include-dir=/usr/local/lib/gcc9/include/c++/
--with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection'
--with-system-zlib --enable-languages=c,c++,objc,fortran --prefix=/usr/local
--localstatedir=/var --mandir=/usr/local/man
--infodir=/usr/local/share/info/gcc9 --build=x86_64-portbld-freebsd13.0
Thread model: posix
gcc version 9.3.0 (FreeBSD Ports Collection)

[Bug c++/94493] FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if building ftp/filezilla

2020-04-05 Thread gcc-bugs at opsec dot eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94493

--- Comment #4 from Kurt Jaeger  ---
Created attachment 48202
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48202&action=edit
The source code

As described, it crashes very early in the compile

[Bug c++/94493] FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if building ftp/filezilla

2020-04-06 Thread gcc-bugs at opsec dot eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94493

--- Comment #7 from Kurt Jaeger  ---
This command produces -E output, see attached out.txt and err.txt:

g++9 \
-v \
-E \
-std=c++17 \
-DHAVE_CONFIG_H \
-I. \
-I../../src/include \
-isystem /usr/local/include \
-fpch-preprocess \
-fno-strict-aliasing \
-fwrapv \
-fno-aggressive-loop-optimizations \
-fsanitize=undefined \
-O2 \
-Wl,-rpath=/usr/local/lib/gcc9 \
-Wall \
-Wextra \
-g \
engine_context.cpp

Adding -fstack-protector-strong causes it to crash without producing output.

[Bug c++/94493] FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if building ftp/filezilla

2020-04-06 Thread gcc-bugs at opsec dot eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94493

--- Comment #8 from Kurt Jaeger  ---
Created attachment 48215
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48215&action=edit
stderr of working build

stdout is at: https://people.freebsd.org/~pi/logs/out.txt

[Bug c++/94493] FreeBSD-ports lang/gcc9 (9.3.0) on FreeBSD 13 crash if building ftp/filezilla

2020-04-06 Thread gcc-bugs at opsec dot eu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94493

--- Comment #10 from Kurt Jaeger  ---
If the option -fstack-protector-strong is used, the *.i* files are empty.