rajendra.sy at gmail dot com
2018-04-22 03:15:44 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23105
Bug ID: 23105
Summary: Core file error 'Cannot access memory at address' on
FreeBSD
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: rajendra.sy at gmail dot com
Target Milestone: ---
Test case: gdb.base/gcore-relro-pie.exp
Examining memory using "x/i $pc" fails with error message cannot access memory.
The test fails only with "pie" option.
I tried to compile above test case with/without pie option as below:
Using gcc-6.4.0 on FreeBSD-10.3:
1. With "-fpie -pie" option
$ gcc -fpie -pie -Wl,-z,relro -lm -g -o gcore-relro-pie ./gcore-relro-pie.c
$ strip -g -o gcore-relro-pie.stripped gcore-relro-pie
$ ./gcore-relro-pie.stripped
Segmentation fault (core dumped)
$ gdb
(gdb) file gcore-relro-pie.stripped
(gdb) core gcore-relro-pie.str.core
(gdb) x/i $pc
=> 0x1021944: Cannot access memory at address 0x1021944
2. Without "-fpie -pie" option
$ gcc -Wl,-z,relro -lm -g -o gcore-relro ./gcore-relro-pie.c
$ strip -g -o gcore-relro.stripped gcore-relro
$ ./gcore-relro.stripped
Segmentation fault (core dumped)
$ gdb
(gdb) file gcore-relro.stripped
(gdb) core gcore-relro.strippe.core
(gdb) x/i $pc
=> 0x40076f <break_here+9>: movl $0x0,(%rax)
Bug ID: 23105
Summary: Core file error 'Cannot access memory at address' on
FreeBSD
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: rajendra.sy at gmail dot com
Target Milestone: ---
Test case: gdb.base/gcore-relro-pie.exp
Examining memory using "x/i $pc" fails with error message cannot access memory.
The test fails only with "pie" option.
I tried to compile above test case with/without pie option as below:
Using gcc-6.4.0 on FreeBSD-10.3:
1. With "-fpie -pie" option
$ gcc -fpie -pie -Wl,-z,relro -lm -g -o gcore-relro-pie ./gcore-relro-pie.c
$ strip -g -o gcore-relro-pie.stripped gcore-relro-pie
$ ./gcore-relro-pie.stripped
Segmentation fault (core dumped)
$ gdb
(gdb) file gcore-relro-pie.stripped
(gdb) core gcore-relro-pie.str.core
(gdb) x/i $pc
=> 0x1021944: Cannot access memory at address 0x1021944
2. Without "-fpie -pie" option
$ gcc -Wl,-z,relro -lm -g -o gcore-relro ./gcore-relro-pie.c
$ strip -g -o gcore-relro.stripped gcore-relro
$ ./gcore-relro.stripped
Segmentation fault (core dumped)
$ gdb
(gdb) file gcore-relro.stripped
(gdb) core gcore-relro.strippe.core
(gdb) x/i $pc
=> 0x40076f <break_here+9>: movl $0x0,(%rax)
--
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.