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 record/19187] New: running with process record over a fork causes GDB internal error


https://sourceware.org/bugzilla/show_bug.cgi?id=19187

            Bug ID: 19187
           Summary: running with process record over a fork causes GDB
                    internal error
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: record
          Assignee: unassigned at sourceware dot org
          Reporter: koriakin at 0x04 dot net
  Target Milestone: ---

$ cat f.c
#include <unistd.h>
#include <stdio.h>

int main() {
        int a = fork();
        printf("%d\n", a);
        return 0;
}
$ gcc f.c -g
$ gdb ./a.out
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./a.out...done.
(gdb) break main
Breakpoint 1 at 0x40054e: file f.c, line 5.
(gdb) r
Starting program: /home/mwk/a.out 

Breakpoint 1, main () at f.c:5
5               int a = fork();
(gdb) record
(gdb) step
0
record-full.c:1716: internal-error: record_full_remove_breakpoint: removing
unknown breakpoint
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 

The bug occurs on 7.10, as well as current HEAD.  I have submitted a testcase
covering this bug at
https://sourceware.org/ml/gdb-patches/2015-10/msg00444.html
(linux-waitpid-reverse.exp).  The bug appears to be architecture-independent -
I've tested on i386, x86_64, x32, s390, s390x.

-- 
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]