rupeshpotharla at gmail dot com
2018-06-18 06:53:17 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23302
Bug ID: 23302
Summary: SIGSEGV in gdb
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: rupeshpotharla at gmail dot com
Target Milestone: ---
I am seeing the below issue in my program when running via gdb. Is this a known
issue? Am I missing something here?
Can anyone help me resolve this issue?
My test program
=============
#include<stdio.h>
int main()
{
const char foo[] = "foo";
printf("foo= %s", foo);
}
GNU gdb (GDB) 8.1
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-pc-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 1...done.
(gdb) br main
Breakpoint 1 at 0x400542: file /var/1.c, line 5.
(gdb) r
Starting program: /var/1
warning: linux_ptrace_test_ret_to_nx: PC 0x33 is neither near return address
0x7ffff7ff1000 nor is the return instruction 0x445ab1!
Breakpoint 1, main () at /var/1.c:5
5 const char foo[] = "foo";
(gdb) p strlen(foo)
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000033 in ?? ()
warning: Unable to restore previously selected frame.
Couldn't write registers: Input/output error.
Bug ID: 23302
Summary: SIGSEGV in gdb
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: rupeshpotharla at gmail dot com
Target Milestone: ---
I am seeing the below issue in my program when running via gdb. Is this a known
issue? Am I missing something here?
Can anyone help me resolve this issue?
My test program
=============
#include<stdio.h>
int main()
{
const char foo[] = "foo";
printf("foo= %s", foo);
}
GNU gdb (GDB) 8.1
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-pc-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 1...done.
(gdb) br main
Breakpoint 1 at 0x400542: file /var/1.c, line 5.
(gdb) r
Starting program: /var/1
warning: linux_ptrace_test_ret_to_nx: PC 0x33 is neither near return address
0x7ffff7ff1000 nor is the return instruction 0x445ab1!
Breakpoint 1, main () at /var/1.c:5
5 const char foo[] = "foo";
(gdb) p strlen(foo)
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000033 in ?? ()
warning: Unable to restore previously selected frame.
Couldn't write registers: Input/output error.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.