public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/43467]  New: LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer"
@ 2010-03-21 17:24 d dot g dot gorbachev at gmail dot com
  2010-03-21 17:25 ` [Bug lto/43467] " d dot g dot gorbachev at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-03-21 17:24 UTC (permalink / raw)
  To: gcc-bugs




-- 
           Summary: LTO error "bytecode stream: trying to read 0 bytes after
                    the end of the input buffer"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: d dot g dot gorbachev at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43467


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug lto/43467] LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer"
  2010-03-21 17:24 [Bug lto/43467] New: LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer" d dot g dot gorbachev at gmail dot com
@ 2010-03-21 17:25 ` d dot g dot gorbachev at gmail dot com
  2010-04-24 20:23 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-03-21 17:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from d dot g dot gorbachev at gmail dot com  2010-03-21 17:25 -------
Created an attachment (id=20151)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20151&action=view)
Testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43467


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug lto/43467] LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer"
  2010-03-21 17:24 [Bug lto/43467] New: LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer" d dot g dot gorbachev at gmail dot com
  2010-03-21 17:25 ` [Bug lto/43467] " d dot g dot gorbachev at gmail dot com
@ 2010-04-24 20:23 ` rguenth at gcc dot gnu dot org
  2010-06-03 15:31 ` rguenth at gcc dot gnu dot org
  2010-06-03 18:29 ` ccoutant at gcc dot gnu dot org
  3 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-24 20:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-04-24 20:23 -------
With -fipa-cp -flto -fuse-linker-plugin -Wl,--allow-multiple-definition,
but gold does not know --allow-multiple-definition and thus I get

> gcc-4.5 1.c 2.c -fipa-cp -flto -fuse-linker-plugin
/usr/bin/gold: error: /tmp/ccLqKKQ3.o: multiple definition of f
/usr/bin/gold: error: /tmp/ccgya79G.o: previous definition here
lto1: internal compiler error: bytecode stream: trying to read 0 bytes after
the end of the input buffer

which simply means that we do not properly detect gold exiting with an error.

With GNU ld and w/o -fuse-linker-plugin I see

$ ./xgcc -B. 2.c 1.c -fipa-cp -flto -Wl,--allow-multiple-definition
/tmp/ccedC6yL.o: In function `f':
2.c:(.text+0x7): undefined reference to `g'
2.c:(.text+0xf): undefined reference to `h'
collect2: ld returned 1 exit status

which means it "works" and we choose the wrong f() to succeed linking
and thus we never end up invoking lto1 (which is what should happen
in the gold case as well).

Yes, we _do_ invoke the linker before invoking lto1!


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-04-24 20:23:01
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43467


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug lto/43467] LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer"
  2010-03-21 17:24 [Bug lto/43467] New: LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer" d dot g dot gorbachev at gmail dot com
  2010-03-21 17:25 ` [Bug lto/43467] " d dot g dot gorbachev at gmail dot com
  2010-04-24 20:23 ` rguenth at gcc dot gnu dot org
@ 2010-06-03 15:31 ` rguenth at gcc dot gnu dot org
  2010-06-03 18:29 ` ccoutant at gcc dot gnu dot org
  3 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-03 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-06-03 15:31 -------
Cary - why does lto-plugin get invoked when gold has errors?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ccoutant at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43467


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug lto/43467] LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer"
  2010-03-21 17:24 [Bug lto/43467] New: LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer" d dot g dot gorbachev at gmail dot com
                   ` (2 preceding siblings ...)
  2010-06-03 15:31 ` rguenth at gcc dot gnu dot org
@ 2010-06-03 18:29 ` ccoutant at gcc dot gnu dot org
  3 siblings, 0 replies; 8+ messages in thread
From: ccoutant at gcc dot gnu dot org @ 2010-06-03 18:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ccoutant at gcc dot gnu dot org  2010-06-03 18:29 -------
> Cary - why does lto-plugin get invoked when gold has errors?

Gold doesn't stop on these kinds of errors -- it proceeds to the end of the
link to try to diagnose as many errors as possible. I'm not sure why a
multiple-definition error would cause this problem in lto1, though. Nothing
should be preventing the plugin from generating valid IR files, unless the
presence of the duplicate definition is causing a different problem inside
either the plugin itself or lto1.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43467


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug lto/43467] LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer"
       [not found] <bug-43467-4@http.gcc.gnu.org/bugzilla/>
  2010-11-20 15:55 ` d.g.gorbachev at gmail dot com
  2011-01-26 14:47 ` hubicka at gcc dot gnu.org
@ 2011-01-26 18:21 ` d.g.gorbachev at gmail dot com
  2 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-01-26 18:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43467

Dmitry Gorbachev <d.g.gorbachev at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #7 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-01-26 17:55:57 UTC ---
.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug lto/43467] LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer"
       [not found] <bug-43467-4@http.gcc.gnu.org/bugzilla/>
  2010-11-20 15:55 ` d.g.gorbachev at gmail dot com
@ 2011-01-26 14:47 ` hubicka at gcc dot gnu.org
  2011-01-26 18:21 ` d.g.gorbachev at gmail dot com
  2 siblings, 0 replies; 8+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-01-26 14:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43467

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-26 14:40:34 UTC ---
Given the shape of 4.5 LTO, I would propose this for WONTFIX.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug lto/43467] LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer"
       [not found] <bug-43467-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-20 15:55 ` d.g.gorbachev at gmail dot com
  2011-01-26 14:47 ` hubicka at gcc dot gnu.org
  2011-01-26 18:21 ` d.g.gorbachev at gmail dot com
  2 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2010-11-20 15:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43467

Dmitry Gorbachev <d.g.gorbachev at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.6.0
      Known to fail|                            |4.5.2

--- Comment #5 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2010-11-20 15:36:16 UTC ---
Does not fail with GCC 4.6.0 20101113. Fails with 4.5.2.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-26 17:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-21 17:24 [Bug lto/43467] New: LTO error "bytecode stream: trying to read 0 bytes after the end of the input buffer" d dot g dot gorbachev at gmail dot com
2010-03-21 17:25 ` [Bug lto/43467] " d dot g dot gorbachev at gmail dot com
2010-04-24 20:23 ` rguenth at gcc dot gnu dot org
2010-06-03 15:31 ` rguenth at gcc dot gnu dot org
2010-06-03 18:29 ` ccoutant at gcc dot gnu dot org
     [not found] <bug-43467-4@http.gcc.gnu.org/bugzilla/>
2010-11-20 15:55 ` d.g.gorbachev at gmail dot com
2011-01-26 14:47 ` hubicka at gcc dot gnu.org
2011-01-26 18:21 ` d.g.gorbachev at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).