Bug 1309682 - gcc-4.8.5-4.el7 segfaults
gcc-4.8.5-4.el7 segfaults
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jakub Jelinek
Depends On:
Blocks: 1413146
  Show dependency treegraph
Reported: 2016-02-18 08:13 EST by Lukáš Nykrýn
Modified: 2017-04-04 08:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-04-04 08:42:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
some files (7.79 MB, application/x-gzip)
2016-02-18 09:00 EST, Lukáš Nykrýn
no flags Details

  None (edit)
Description Lukáš Nykrýn 2016-02-18 08:13:29 EST
Description of problem:
We are trying to setup CI for upstream systemd, but compilation seems to always end with segfault of gcc. I am only able to reproduce on openstack machine from our QE. We have not seen it anywhere else.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Ping me on IRC and I will prepare a machine, where this issue can be reproduced.

1. Fetch this repo https://copr.fedorainfracloud.org/coprs/lnykryn/systemd-centosci-environment/
2. install systemd-ci-environment metapackage
3. clone systemd upstream sources https://github.com/systemd/systemd
4.  apply this small patch
diff --git a/src/basic/missing.h b/src/basic/missing.h
index f3d3236..ddb70cc 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -889,6 +889,7 @@ static inline int setns(int fd, int nstype) {
 #define NDA_UNSPEC 0

5. run ./autogen.sh && ./configure && make

Actual results:
[0 root@qeos-33 systemd]# gcc -std=gnu99 -pipe -Wall -Wextra -Wundef -Wformat=2 -Wformat-security -Wformat-nonliteral -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Werror=overflow -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong -fPIE --param=ssp-buffer-size=4 -Werror=shadow -flto -ffunction-sections -fdata-sections -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -g -O2 -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,-z -Wl,now -pie -Wl,-fuse-ld=gold -o systemd-analyze src/analyze/systemd_analyze-analyze.o src/analyze/systemd_analyze-analyze-verify.o  ./.libs/libcore.a -lselinux -lcap -lrt -lm -lresolv -llzma -lgcrypt -ldl -lgpg-error -lacl -lidn -lseccomp -lpam -lpam_misc -laudit -lkmod -lmount -pthread
src/core/dbus.c: In function ‘bus_init’:
src/core/dbus.c:1041:5: internal compiler error: Neoprávněný přístup do paměti (SIGSEGV)
 int bus_init(Manager *m, bool try_bus_connect) {
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
lto-wrapper: gcc returned 1 exit status
/usr/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Comment 1 Marek Polacek 2016-02-18 08:18:21 EST
Please attach preprocessed source (e.g. use -save-temps) and g++ options used
to compile it.
Comment 2 Marek Polacek 2016-02-18 08:18:49 EST
(In reply to Marek Polacek from comment #1)
> Please attach preprocessed source (e.g. use -save-temps) and g++ options used
> to compile it.

gcc, not g++, in this case.
Comment 4 Lukáš Nykrýn 2016-02-18 09:00 EST
Created attachment 1128226 [details]
some files
Comment 8 Marek Polacek 2017-04-04 08:42:55 EDT
I think we won't be able to fix this in RHEL7; not using -flto will help.  I think let's close this BZ.

Note You need to log in before you can comment on or make changes to this bug.