From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52909 invoked by alias); 25 Aug 2015 23:07:17 -0000 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 Received: (qmail 52887 invoked by uid 48); 25 Aug 2015 23:07:16 -0000 From: "luto at mit dot edu" To: gdb-prs@sourceware.org Subject: [Bug gdb/18869] New: internal-error: inline_frame_this_id: Assertion `frame_id_p (*this_id)' failed. Date: Tue, 25 Aug 2015 23:07: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-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: luto at mit dot edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q3/txt/msg00225.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18869 Bug ID: 18869 Summary: internal-error: inline_frame_this_id: Assertion `frame_id_p (*this_id)' failed. Product: gdb Version: 7.9 Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: luto at mit dot edu Target Milestone: --- Build this awful hack with -m32 -O2 -g. #include #include #include #include #include #include #include #include #include #include #include #include static void *vsyscall32; static void do_full_vsyscall32(unsigned long *nr, unsigned long *arg0, unsigned long *arg1, unsigned long *arg2, unsigned long *arg3, unsigned long *arg4, unsigned long *arg5) { /* * The asm above is still correct, but GCC can't generate code. * * Because we want to preserve the values in all the registers * after return, we need to spill to the stack. Ideally we'd * force gcc to generate esp-relative references to some local * variables, but I don't think that's possible. That means * that we can't use any memory operands while ebp is arg5 * instead of the base pointer, so we're stuck manually * spilling. */ register unsigned long sp asm("sp"); /* Hack: block fp omission */ unsigned long saved_bx; asm volatile ( "movl %%ebx, %[saved_bx]\n\t" "pushl %%ebp\n\t" "movl %[arg0], %%ebx\n\t" "movl %[arg5], %%ebp\n\t" "call *%[vsyscall32]\n\t" "xchgl %%ebp, (%%esp)\n\t" /* restore BP but keep arg5 */ "popl %[arg5]\n\t" "movl %%ebx, %[arg0]\n\t" "movl %[saved_bx], %%ebx" : "+a" (*nr), [arg0] "+m" (*arg0), "+c" (*arg1), "+d" (*arg2), "+S" (*arg3), "+D" (*arg4), [arg5] "+m" (*arg5), [saved_bx] "+m" (saved_bx), "+r" (sp) : [vsyscall32] "m" (vsyscall32)); } int main() { unsigned long nr = 224, a0 = 10, a1 = 11, a2 = 12, a3 = 13, a4 = 14, a5 = 15; vsyscall32 = (void *)getauxval(AT_SYSINFO); if (vsyscall32) { nr = SYS_kill; a0 = getpid(); a1 = SIGUSR1; /* <-- breakpoint here */ do_full_vsyscall32(&nr, &a0, &a1, &a2, &a3, &a4, &a5); printf("%ld %ld %ld %ld %ld %ld %ld\n", nr, a0, a1, a2, a3, a4, a5); } return 0; } $ gdb ./a.out GNU gdb (GDB) Fedora 7.9.1-17.fc22 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./a.out...done. (gdb) b foo.c:60 Breakpoint 1 at 0x8048411: file foo.c, line 60. (gdb) r Starting program: /home/luto/apps/linux-devel/tools/testing/selftests/x86/a.out Missing separate debuginfos, use: dnf debuginfo-install glibc-2.21-7.fc22.i686 Program received signal SIGUSR1, User defined signal 1. 0xf7fdac10 in __kernel_vsyscall () (gdb) bt ../../gdb/inline-frame.c:167: internal-error: inline_frame_this_id: Assertion `frame_id_p (*this_id)' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) -- You are receiving this mail because: You are on the CC list for the bug.