Bug 57889
| Summary: | gcc -Ox produces bad startup code with -gx on AMD TBird | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Landon Curt Noll <redhat-mail> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | athlon | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2001-12-31 21:56:49 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Landon Curt Noll
2001-12-31 00:55:31 UTC
Cannot reproduce this either. Are you sure your hardware is ok? Can you try using an .i686.rpm kernel instead of .athlon.rpm one (or use noathlon). Did you try it under RH7.0 or RH7.1 (with the latest RPM patches)? On RH7.0 for example the kernel was built with these processor type and features: CONFIG_M686=y CONFIG_X86_WP_WORKS_OK=y CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y CONFIG_X86_TSC=y CONFIG_X86_GOOD_APIC=y # CONFIG_MICROCODE is not set CONFIG_X86_MSR=y CONFIG_X86_CPUID=y # CONFIG_1GB is not set CONFIG_2GB=y # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y # CONFIG_SMP is not set What sort of CPU were you using? Here is the /proc/cpuinfo for a system on which -O -g dies in startup: processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 4 model name : AMD Athlon(tm) processor stepping : 4 cpu MHz : 1396.557 cache size : 256 KB fdiv_bug : no hlt_bug : no sep_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 psn mmxext mmx fxsr 3dnowext 3dnow bogomips : 2785.28 How does that compare with the system on which you tested? Here is a /proc/cpuinfo on a non-TBird CPU for which -O -g does NOT fail in startup: processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 2 model name : AMD Athlon(tm) Processor stepping : 1 cpu MHz : 598.841 cache size : 512 KB fdiv_bug : no hlt_bug : no sep_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmxext mmx fxsr 3dnowext 3dnow bogomips : 1192.75 Both are running: gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) glibc-profile-2.2.4-18.7.0.3 glib-devel-1.2.8-4 compat-glibc-6.2-2.1.3.2 glib10-1.0.6-9 glibc-devel-2.2.4-18.7.0.3 glibc-common-2.2.4-18.7.0.3 glib-1.2.8-4 glibc-2.2.4-18.7.0.3 gcc-c++-2.96-85 kgcc-1.1.2-40 gcc-2.96-85 gcc-objc-2.96-85 gcc-g77-2.96-85 Does that help? > Are you sure your hardware is ok? The hardware tests are clean. I have had no crashes or CPU lockups. Ran CPU and disk heavy jobs for extended periods of time without any problems being detected (computational-wise or system crash/lockup-wise) > Can you try using an .i686.rpm kernel instead of .athlon.rpm one > (or use noathlon). I'm using kernel-2.2.19-7.0.12 with the CPU/Processor options as shown in the previous posting. FYI: The same -O -g bug shows up under a 2.2.19-7.0.10 kernel ... The bug seems to be triggered by use of readline. If calc is compiled without readline, all is OK and calc does not dump core prior to main. If calc is compiled with readline, then calc dumps core in startup. Take a look at this tarball: http://www.isthe.com/chongo/src/calc/gcc-readline-calc-bug.tar.gz The Makefile in the gcc-readline-calc-bug.tar.gz file has been changed to compile with readline. I also changed the default compile to use '-O -g". The calc binary was compiled under RH7.0 with: (I did a rpm -q -a | egrep 'gcc|libc|readline|curses' which printed out a few more RPMs that needed, but you should get the idea) ncurses-5.2-2 libc-5.3.12-31 gcc-2.96-85 glibc-common-2.2.4-18.7.0.3 readline-4.1-5 ncurses-devel-5.2-2 gcc-g77-2.96-85 gcc-c++-2.96-85 compat-glibc-6.2-2.1.3.2 ncurses4-5.0-2 readline2.2.1-2.2.1-2 glibc-2.2.4-18.7.0.3 glibc-profile-2.2.4-18.7.0.3 readline-devel-4.1-5 kgcc-1.1.2-40 gcc-objc-2.96-85 glibc-devel-2.2.4-18.7.0.3 on a 2.2.19-7.0.12 kernel. The core dump in that tarball shows the effect of the pre-main seg fault. =-= It is interesting to note that under the RH7.0 stock CD, this bug does not show up. Something that was updated (kernel? glibc? gcc?) changed the behaviour of calc when compiled with -O -g. Ideas? Calc works with readline and -g3 and -O3 under RH7.3. |