public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/13431] New: jit code registration cleanup
@ 2011-11-22 21:31 sphink at gmail dot com
  2011-12-16 19:56 ` [Bug gdb/13431] " sphink at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sphink at gmail dot com @ 2011-11-22 21:31 UTC (permalink / raw)
  To: gdb-prs

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

             Bug #: 13431
           Summary: jit code registration cleanup
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: sphink@gmail.com
    Classification: Unclassified


When using the JIT CFI registration API, I very commonly run into

  Unsupported JIT protocol version in descriptor!

Or, when I'm unlucky, extremely bizarre behavior: the inferior starts jumping
to invalid locations. I generally notice it when it lands between two
instructions and I get a SIGILL, though I have noticed at least one case where
it just silently executed the wrong code.

I haven't seen the latter failure mode for a while.

I believe the problem is triggered when I am debugging a binary, and then I
recompile it in a way that changes the location of __jit_debug_descriptor. It
seems to reload the object file, then use the old location to unregister the
old JIT code. Or something.

The exact series of events goes something like:

  1. (gdb) run
  2. ...stop at a breakpoint...
  3. recompile
  4. (gdb) run
Unsupported JIT protocol version in descriptor!
  5. (gdb) run
`/home/sfink/src/MI-jitprofiler/obj/dist/bin/js' has changed; re-reading
symbols.
Unsupported JIT protocol version in descriptor!
  6. (gdb) run
Warning:
Cannot insert breakpoint -14865.
Error accessing memory address 0x378d805b60: Input/output error.
Cannot insert breakpoint -14866.
Error accessing memory address 0x378d805b70: Input/output error.
  7. (gdb) run
Now it runs, but all CFI information is completely mangled. Stack traces have
bogus return addresses.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2012-02-16 18:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-22 21:31 [Bug gdb/13431] New: jit code registration cleanup sphink at gmail dot com
2011-12-16 19:56 ` [Bug gdb/13431] " sphink at gmail dot com
2011-12-16 20:01 ` sphink at gmail dot com
2012-02-01 17:45 ` tromey at redhat dot com
2012-02-01 20:22 ` cvs-commit at gcc dot gnu.org
2012-02-01 20:23 ` tromey at redhat dot com
2012-02-09 20:24 ` sphink at gmail dot com
2012-02-16  0:56 ` sphink at gmail dot com
2012-02-16 18:17 ` tromey at redhat 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).