public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49587] New: Code generation error with dynamic libraries.
@ 2011-06-30  7:29 jarrydb at cse dot unsw.edu.au
  2011-06-30  9:58 ` [Bug c++/49587] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jarrydb at cse dot unsw.edu.au @ 2011-06-30  7:29 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Code generation error with dynamic libraries.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jarrydb@cse.unsw.edu.au


I have a rather large piece of code (about 20,000 lines) which doesn't appear
to be compiled correctly. I can't reproduce the error, but I have found the
revision that breaks it, and I can describe roughly what the error is.

The last revision that works is 175340, it is broken in 175341.

Initially the bug surfaced as the instruction pointer trying to execute address
0x0. After further digging (with gdb, running instruction by instruction) I
discovered that at a function call, which was in a dynamic library, upon trying
to resolve the address of the function, it found that the function was at
address zero. It got to the particular function call, went through the dynamic
library lookup table, then it dies.


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

* [Bug c++/49587] Code generation error with dynamic libraries.
  2011-06-30  7:29 [Bug c++/49587] New: Code generation error with dynamic libraries jarrydb at cse dot unsw.edu.au
@ 2011-06-30  9:58 ` rguenth at gcc dot gnu.org
  2011-06-30 10:17 ` jarrydb at cse dot unsw.edu.au
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-30  9:58 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.06.30 09:58:10
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-30 09:58:10 UTC ---
We need a testcase and more information like used compile flags and compiler
version.


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

* [Bug c++/49587] Code generation error with dynamic libraries.
  2011-06-30  7:29 [Bug c++/49587] New: Code generation error with dynamic libraries jarrydb at cse dot unsw.edu.au
  2011-06-30  9:58 ` [Bug c++/49587] " rguenth at gcc dot gnu.org
@ 2011-06-30 10:17 ` jarrydb at cse dot unsw.edu.au
  2011-06-30 11:53 ` jarrydb at cse dot unsw.edu.au
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jarrydb at cse dot unsw.edu.au @ 2011-06-30 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jarryd Beck <jarrydb at cse dot unsw.edu.au> 2011-06-30 10:16:58 UTC ---
I wish that I could give you a test case. I can't reproduce it on any small
piece of code. The only code that I can get it to break on is my project which
has about 20,000 lines of code. It has nearly 100 files and uses boost spirit.
It compiles into a library and several executables.

The compiler version I already stated. It's gcc svn, the first broken revision
is 175341 (maybe that wasn't clear).

The flags used for compiling are simply -fPIC for the library and nothing extra
for the executables.

Another thing to note is that I moved the function call in which the error
occurs to later in my code, and a different function bombed in exactly the same
way.

How would you like me to proceed?


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

* [Bug c++/49587] Code generation error with dynamic libraries.
  2011-06-30  7:29 [Bug c++/49587] New: Code generation error with dynamic libraries jarrydb at cse dot unsw.edu.au
  2011-06-30  9:58 ` [Bug c++/49587] " rguenth at gcc dot gnu.org
  2011-06-30 10:17 ` jarrydb at cse dot unsw.edu.au
@ 2011-06-30 11:53 ` jarrydb at cse dot unsw.edu.au
  2011-06-30 16:43 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jarrydb at cse dot unsw.edu.au @ 2011-06-30 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jarryd Beck <jarrydb at cse dot unsw.edu.au> 2011-06-30 11:52:52 UTC ---
Sorry I better get that function in the dynamic loading correct. It calls the
actual function which goes to _dl_runtime_resolve which calls _dl_fixup, then
it bombs at the end of _dl_runtime_resolve.


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

* [Bug c++/49587] Code generation error with dynamic libraries.
  2011-06-30  7:29 [Bug c++/49587] New: Code generation error with dynamic libraries jarrydb at cse dot unsw.edu.au
                   ` (2 preceding siblings ...)
  2011-06-30 11:53 ` jarrydb at cse dot unsw.edu.au
@ 2011-06-30 16:43 ` pinskia at gcc dot gnu.org
  2011-06-30 20:56 ` jarrydb at cse dot unsw.edu.au
  2011-07-10 12:21 ` jarrydb at cse dot unsw.edu.au
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-06-30 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-06-30 16:43:08 UTC ---
Most likely a dup of bug 49538.


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

* [Bug c++/49587] Code generation error with dynamic libraries.
  2011-06-30  7:29 [Bug c++/49587] New: Code generation error with dynamic libraries jarrydb at cse dot unsw.edu.au
                   ` (3 preceding siblings ...)
  2011-06-30 16:43 ` pinskia at gcc dot gnu.org
@ 2011-06-30 20:56 ` jarrydb at cse dot unsw.edu.au
  2011-07-10 12:21 ` jarrydb at cse dot unsw.edu.au
  5 siblings, 0 replies; 7+ messages in thread
From: jarrydb at cse dot unsw.edu.au @ 2011-06-30 20:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jarryd Beck <jarrydb at cse dot unsw.edu.au> 2011-06-30 20:56:32 UTC ---
Ah, yes I think it is.


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

* [Bug c++/49587] Code generation error with dynamic libraries.
  2011-06-30  7:29 [Bug c++/49587] New: Code generation error with dynamic libraries jarrydb at cse dot unsw.edu.au
                   ` (4 preceding siblings ...)
  2011-06-30 20:56 ` jarrydb at cse dot unsw.edu.au
@ 2011-07-10 12:21 ` jarrydb at cse dot unsw.edu.au
  5 siblings, 0 replies; 7+ messages in thread
From: jarrydb at cse dot unsw.edu.au @ 2011-07-10 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

Jarryd Beck <jarrydb at cse dot unsw.edu.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #6 from Jarryd Beck <jarrydb at cse dot unsw.edu.au> 2011-07-10 12:20:26 UTC ---
It is definitely a duplicate of bug 49538 which is fixed now, and my problem is
fixed. So I am marking this as resolved.

*** This bug has been marked as a duplicate of bug 49538 ***


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

end of thread, other threads:[~2011-07-10 12:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-30  7:29 [Bug c++/49587] New: Code generation error with dynamic libraries jarrydb at cse dot unsw.edu.au
2011-06-30  9:58 ` [Bug c++/49587] " rguenth at gcc dot gnu.org
2011-06-30 10:17 ` jarrydb at cse dot unsw.edu.au
2011-06-30 11:53 ` jarrydb at cse dot unsw.edu.au
2011-06-30 16:43 ` pinskia at gcc dot gnu.org
2011-06-30 20:56 ` jarrydb at cse dot unsw.edu.au
2011-07-10 12:21 ` jarrydb at cse dot unsw.edu.au

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).