This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/13431] New: jit code registration cleanup


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]