Bug 86441
Summary: | gcc 3.2.2-10 failed to compile glibc when -O3 is used | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | hjl | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 1.0 | CC: | jorton, mitr, roland | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 3.2.2-13 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-08-05 16:23:20 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: | |||||||
Attachments: |
|
Description
hjl
2003-03-22 00:27:14 UTC
Created attachment 90692 [details]
A testcase
It also affects x86. When -O3 is used, the build finished. But the debug information is bogus: # gdb build-i686-linux.old/elf/ld-linux.so.2 dlopen failed on 'libthread_db.so.1' - /lib/tls/libthread_db.so.1: undefined symbol: ps_get_thread_area GDB will not be able to debug pthreads. GNU gdb 2003-03-04-cvs Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (gdb) r Starting program: /export/build/gnu/glibc/build-i686-linux.old/elf/ld-linux.so.2 Die: DW_TAG_formal_parameter (abbrev = 30, offset = 3958) has children: FALSE attributes: DW_AT_name (DW_FORM_string) string: "sym" DW_AT_decl_file (DW_FORM_data1) constant: 2 DW_AT_decl_line (DW_FORM_data2) constant: 365 DW_AT_type (DW_FORM_ref4) constant: 2598 Dwarf Error: Cannot find type of die [in module /export/build/gnu/glibc/build-i686-linux.old/elf/ld-linux.so.2] (gdb) I believe it is the same problem as ia64. The only difference is cc1 doesn't die when the corrupted memory is accessed. I guess it might be related to what I'm debugging ATM: /* ICE if run in efence. */ /* { dg-do compile } */ /* { dg-options "-O3 -g" } */ typedef int T; int bar (T *, const char *); int foo (const char *x) { auto inline int try (T *y); static T t; inline int try (T *y) { return bar (y, x); } return try (&t); } Can you try commenting out remove_children call in dwarf2out.c (gen_subprogram_die)? I'm still trying to understand why some DIEs are at compile_unit level and some are at subroutine level only. The call to remove_children is the cause of the whole problem. It frees a die which is still referenced by the call to add_AT_die_ref from modified_type_die. On ia64, cc1 dies because memory corruption. But on x86, bogus debug info is generated. *** Bug 86215 has been marked as a duplicate of this bug. *** |