[Bug gold/10842] New: Segmentation fault in GOLD when using GCC's LTO plugin

View: New views
11 Messages — Rating Filter:   Alert me  

[Bug gold/10842] New: Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

GNU gold (GNU Binutils 2.20.51.20091020) 1.9
gcc (GCC) 4.5.0 20091022 (experimental)

--
           Summary: Segmentation fault in GOLD when using GCC's LTO plugin
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: ian at airs dot com
        ReportedBy: d dot g dot gorbachev at gmail dot com
                CC: bug-binutils at gnu dot org,ian at airs dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From d dot g dot gorbachev at gmail dot com  2009-10-25 15:35 -------
Created an attachment (id=4316)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4316&action=view)
Testcase


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From d dot g dot gorbachev at gmail dot com  2009-10-25 15:35 -------
Created an attachment (id=4317)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4317&action=view)
Backtrace


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From ian at airs dot com  2009-10-26 06:00 -------
The backtrace strongly suggests that the linker plugin is mishandling SHN_ABS
symbols.  This should most likely be a bug against the lto-plugin component of
gcc, not against gold.  I can't seem to CC Rafael, since he doesn't seem to have
a sourceware.org/bugzilla account.  I've CC'ed Cary.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ccoutant at google dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From espindola at google dot com  2009-10-27 19:03 -------
Created an attachment (id=4324)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4324&action=view)
testcase


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From espindola at google dot com  2009-10-27 19:03 -------
Created an attachment (id=4325)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4325&action=view)
testcase


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From espindola at google dot com  2009-10-27 19:04 -------
Created an attachment (id=4326)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4326&action=view)
testcase


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From espindola at google dot com  2009-10-27 19:08 -------
I have reduced the test a bit. What is happening:

1) We compile each .c file into a .o. main.o defines main and foo.o defines foo
2) The plugin claims the files and tells the linker about both symbols
3) LTO happens and with -fwhole-program GCC drops foo
4) The linker gets confused with --gc-sections and a missing symbol

The bug goes away if --gc-sections or -fwhole-program is not used.


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From ccoutant at google dot com  2009-10-28 00:09 -------
Created an attachment (id=4331)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4331&action=view)
Patch

Symbol_table::add_from_pluginobj() wasn't setting is_ordinary for the
placeholder SHN_ABS symbols. This patch fixes that and adds a test case.

This bug only shows up in 32-bit mode.

        * symtab.cc (add_from_pluginobj): Pass correct value for is_ordinary.
        * testsuite/Makefile.am (plugin_test_5): New test case.
        * testsuite/Makefile.in: Regenerate.


--
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|ian at airs dot com         |ccoutant at google dot com
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From ian at airs dot com  2009-10-29 04:20 -------
Cary, can we close this as fixed now?

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gold/10842] Segmentation fault in GOLD when using GCC's LTO plugin

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From ccoutant at google dot com  2009-10-29 18:01 -------
Fixed with:
http://sourceware.org/ml/binutils/2009-10/msg00529.html

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils