From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14621 invoked by alias); 22 Nov 2011 21:31:55 -0000 Received: (qmail 14597 invoked by uid 22791); 22 Nov 2011 21:31:54 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Nov 2011 21:31:40 +0000 From: "sphink at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/13431] New: jit code registration cleanup Date: Tue, 22 Nov 2011 21:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sphink at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2011-q4/txt/msg00394.txt.bz2 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.