Bug 1690422
| Summary: | cc: Internal error: Segmentation fault (program cc1) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Jaroslav Škarvada <jskarvad> | ||||||
| Component: | gcc | Assignee: | Marek Polacek <mpolacek> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | Michael Petlan <mpetlan> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 6.10 | CC: | fweimer, jakub, law, ohudlick | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2019-03-26 16:33:26 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Jaroslav Škarvada
2019-03-19 12:57:57 UTC
(In reply to Jaroslav Škarvada from comment #0) > Description of problem: > When upgrading putty in EPEL to version 0.71 to fix multiple security > related problems (bug 1690386 I hit internal compiler error. The same code > compiles OK on RHEL-7 / Fedora. And it also compiles OK on RHEL-7 ppc64. > Unfortunately I haven't time to investigate it more deep. > I wanted to say it also compiles OK on RHEL-6 ppc64. Looks like the segfault is related to the rewrite of crypto routines in putty to gnu99 standard. In case it's known bug, please let me know how to workaround it in the code triggering this. Can you please provide the preprocessed source file? Add -save-temps to cc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/ -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D _FILE_OFFSET_BITS=64 -c ../sshdes.c There will be no 6.11, so the only way to fix something in RHEL 6 gcc would be via 6.10.z. (In reply to Marek Polacek from comment #4) > Can you please provide the preprocessed source file? Add -save-temps to > cc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/ > -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include > -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 > -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 > -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 > -I/usr/include/freetype2 -I/usr/include/libpng12 -D _FILE_OFFSET_BITS=64 > -c ../sshdes.c > > There will be no 6.11, so the only way to fix something in RHEL 6 gcc would > be via 6.10.z. Thanks for replying. Unfortunately, I was wrong with the command causing the segfault, due to the make parallelism, it's actually the following command: # LANG=C cc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/ -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D _FILE_OFFSET_BITS=64 -c ../sshaes.c cc: Internal error: Segmentation fault (program cc1) Please submit a full bug report. See <http://bugzilla.redhat.com/bugzilla> for instructions. NP, I will provide the pre-processed files for it. I am quite realistic about the possibility of the fix in the RHEL-6, so it would be enough for me to know how to workaround the problem in the code. Maybe getting closer: # LANG=C cc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/ -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D _FILE_OFFSET_BITS=64 -c ../sshaes.c -save-temps cc: warning: -pipe ignored because -save-temps specified In file included from ../sshaes.c:1261: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/wmmintrin.h:34:3: error: #error "AES/PCLMUL instructions not enabled" In file included from ../sshaes.c:1262: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/smmintrin.h:32:3: error: #error "SSE4.1 instruction set not enabled" Created attachment 1546057 [details]
pre-processed file
For so old gcc versions, I'd strongly suggest not to use #pragma GCC target before including the intrinsic headers, but instead separate whatever you want to compile with AES/SSE4.1 support into a separate source file and build that with -maes -msse4.1. And because of the above errors, the preprocessed source is really useless, because the aes nor sse4.1 intrinsics aren't defined in there. So, if -maes -msse4.1 on the command line doesn't help, please attach a new preprocessed source generated with those options. Created attachment 1546093 [details]
pre-processed file
-maes -msse4.1 helped, new pre-processed file.
(In reply to Jaroslav Škarvada from comment #10) > Created attachment 1546093 [details] > pre-processed file > > -maes -msse4.1 helped, new pre-processed file. So with it compiles without internal error. I will probably disable the accelerated code on x86. The binary should run on all RHEL-6 supported HW. And if I am not mistaken the default RHEL-6 CFLAGS doesn't include the aes, msse4.1 support (please correct me if I am wrong). It depends if the functions from that TU are used unconditionally (that would be a bug that needs to be fixed) or or only conditionally, depending on what ISA flags cpuid detects (then it would be just fine). I compiled the package in question with SW AES which workarounded the problem. So this BZ is no longer blocking me. Thanks for info. |