[Bug 1874942] [NEW] Seg fault when continue with breakpoint
Sitao Wang
1874942 at bugs.launchpad.net
Sat Apr 25 00:00:12 UTC 2020
Public bug reported:
I am able to run the program without seg fault and just run the program
in gdb does not have seg fault. However, when I set the some specific
breakpoint (but not every possible breakpoint), and then run program,
seg fault will happen on some other line than the breakpoint after some
continues.
Bellow is the trace:
GNU gdb (Ubuntu 8.2-0ubuntu1~16.04.1) 8.2
Copyright (C) 2018 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-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 /home/anygroup/go-repro/909_ziptest_exe2...done.
warning: File "/home/anygroup/go-repro/909-go/src/pkg/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /home/anygroup/go-repro/909-go/src/pkg/runtime/runtime-gdb.py
line to your configuration file "/home/anygroup/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/anygroup/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) br *0x409398
Breakpoint 1 at 0x409398: file /home/anygroup/go-repro/909-go/src/pkg/runtime/mgc0.c, line 135.
(gdb) run test.zip
Starting program: /home/anygroup/go-repro/909_ziptest_exe2 test.zip
Breakpoint 1, 0x0000000000409398 in scanblock (b=<error reading variable: Attempt to dereference a generic pointer.>,
n=<error reading variable: Attempt to dereference a generic pointer.>) at /home/anygroup/go-repro/909-go/src/pkg/runtime/mgc0.c:135
135 obj = (void*)((uintptr)obj & ~((uintptr)PtrSize-1));
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
scanblock (b=<error reading variable: Attempt to dereference a generic pointer.>, n=<error reading variable: Attempt to dereference a generic pointer.>)
at /home/anygroup/go-repro/909-go/src/pkg/runtime/mgc0.c:141
141 xbits = *bitp;
** Affects: gdb (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: "binary and a zip file used as program input"
https://bugs.launchpad.net/bugs/1874942/+attachment/5359929/+files/ziptest.zip
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1874942
Title:
Seg fault when continue with breakpoint
Status in gdb package in Ubuntu:
New
Bug description:
I am able to run the program without seg fault and just run the
program in gdb does not have seg fault. However, when I set the some
specific breakpoint (but not every possible breakpoint), and then run
program, seg fault will happen on some other line than the breakpoint
after some continues.
Bellow is the trace:
GNU gdb (Ubuntu 8.2-0ubuntu1~16.04.1) 8.2
Copyright (C) 2018 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-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 /home/anygroup/go-repro/909_ziptest_exe2...done.
warning: File "/home/anygroup/go-repro/909-go/src/pkg/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /home/anygroup/go-repro/909-go/src/pkg/runtime/runtime-gdb.py
line to your configuration file "/home/anygroup/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/anygroup/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) br *0x409398
Breakpoint 1 at 0x409398: file /home/anygroup/go-repro/909-go/src/pkg/runtime/mgc0.c, line 135.
(gdb) run test.zip
Starting program: /home/anygroup/go-repro/909_ziptest_exe2 test.zip
Breakpoint 1, 0x0000000000409398 in scanblock (b=<error reading variable: Attempt to dereference a generic pointer.>,
n=<error reading variable: Attempt to dereference a generic pointer.>) at /home/anygroup/go-repro/909-go/src/pkg/runtime/mgc0.c:135
135 obj = (void*)((uintptr)obj & ~((uintptr)PtrSize-1));
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
scanblock (b=<error reading variable: Attempt to dereference a generic pointer.>, n=<error reading variable: Attempt to dereference a generic pointer.>)
at /home/anygroup/go-repro/909-go/src/pkg/runtime/mgc0.c:141
141 xbits = *bitp;
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1874942/+subscriptions
More information about the foundations-bugs
mailing list