Closed k0ste closed 6 years ago
@k0ste this could show up under a variety of circumstances, some of them being our problem, others not. What were your compiler flags for this?
./configure \
--prefix="/usr" \
--sbindir="/usr/bin" \
--sysconfdir="/etc/${pkgname}" \
--localstatedir="/run/${pkgname}" \
--enable-exampledir="/etc/${pkgname}" \
--enable-ldpd \
--disable-watchfrr \
--enable-snmp="agentx" \
--enable-multipath=256 \
--enable-user="${pkgname}" \
--enable-group="${pkgname}" \
--enable-vty-group="${pkgname}vty" \
--enable-configfile-mask="0640" \
--enable-logfile-mask="0640" \
--enable-shell-access \
--enable-realms \
--enable-pcreposix \
--enable-systemd \
--enable-poll="yes" \
--enable-shared \
--enable-irdp \
--enable-rpki
@k0ste Those are configure flags, not compiler flags. Helpful, but since compilers (which one btw? gcc? clang?) don't build with -D_FORTIFY_SOURCE
by default, I would like to know what specific options you passed to your compiler, and what version your compiler is.
I don't see this show up with the following flags to gcc:
-g -O0 -D_FORTIFY_SOURCE=2
which should cause the issue as I understand it. My version:
vagrant@frrdev ~/frr> gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
Those are configure flags, not compiler flags.
I'm just mean I was don't change anything, only standard build from stable release.
[k0ste@WorkStation ~]$ gcc --version
gcc (GCC) 7.3.1 20180312
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And kernel:
[k0ste@WorkStation ~]$ cat /proc/config.gz | gunzip -c | grep -i fort
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
CONFIG_FORTIFY_SOURCE=y
@k0ste okay, thanks for the info. I'll take a look.
@k0ste -- I tried building on my Ubuntu 16.04 vm with -D_FORTIFY_SOURCE
under GCC 5.4.0 and am unable to reproduce this.
compiler : gcc -std=gnu11
compiler flags : -g -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer -funwind-tables -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -pthread
I am closing this but will keep an eye out if I see the problem in the future.