Seg fault when continue with breakpoint

Bug #1874942 reported by Sitao Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)
New
Undecided
Unassigned

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;

Revision history for this message
Sitao Wang (sitaowang) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.