Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core dump on -g ? #534

Closed
Susanne588586 opened this issue Jan 13, 2014 · 2 comments
Closed

core dump on -g ? #534

Susanne588586 opened this issue Jan 13, 2014 · 2 comments

Comments

@Susanne588586
Copy link
Contributor

adding -g to gcc crashes radare:

/*

$ r2 -v
radare2 0.9.7git @ linux-little-x86-64 git.0.9.6-335-g772e2ba
commit: 772e2ba build: 2014-01-13

$ gcc -DFORTFY=2 -fstack-protector -fstack-protector-all n.c
$ r2 ./a.out
-- What do you want to debug today?
[0x004004c0]>

                          vs

$ gcc -DFORTFY=2 -fstack-protector -fstack-protector-all -g n.c
$ r2 ./a.out
Segmentation fault (core dumped)

[12705.778678] traps: r2[23408] general protection ip:7f019b69f99a sp:7fff26e91898 error:0 in libc-2.18.so[7f019b61e000+1a0000]
*/

include <stdio.h>

int main() {

char buf[1024];
int i; //

{
for (i=0; i<512; i++)
printf ("%02x", buf[i]);
printf ("\n");
}
}

Kind Regards
Susan E.

@Susanne588586
Copy link
Contributor Author

gdb -q /usr/local/bin/r2 ../core.23408
Reading symbols from /usr/local/bin/radare2...done.

warning: core file may not match specified executable file.
[New LWP 23408]

warning: .dynamic section for "/usr/local/lib/libr_core.so.0.9.7git" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/local/lib/libr_anal.so.0.9.7git" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/local/lib/libr_asm.so.0.9.7git" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/local/lib/radare2/0.9.7git//asm_java.so" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/local/lib/radare2/0.9.7git//bin_java.so" is not at the expected address (wrong library or version mismatch?)

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff26edd000
Core was generated by `r2 a.out'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f019b69f99a in strlen () from /usr/lib/libc.so.6



#4  0x00007f019f342dcd in r_core_file_open (r=0x0, file=0x100000000 <Address 0x100000000 out of bounds>, mode=0, loadaddr=25271952) at file.c:320
(gdb) x/i $pc
=> 0x7f019b69f99a <strlen+42>:  movdqu (%rax),%xmm12

@radare
Copy link
Collaborator

radare commented Jan 14, 2014

can you upload that binary somewhere?

On 14 Jan 2014, at 00:11, Susanne588586 [email protected] wrote:

gdb -q /usr/local/bin/r2 ../core.23408
Reading symbols from /usr/local/bin/radare2...done.

warning: core file may not match specified executable file.
[New LWP 23408]

warning: .dynamic section for "/usr/local/lib/libr_core.so.0.9.7git" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/local/lib/libr_anal.so.0.9.7git" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/local/lib/libr_asm.so.0.9.7git" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/local/lib/radare2/0.9.7git//asm_java.so" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/local/lib/radare2/0.9.7git//bin_java.so" is not at the expected address (wrong library or version mismatch?)

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff26edd000
Core was generated by `r2 a.out'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f019b69f99a in strlen () from /usr/lib/libc.so.6

#4 0x00007f019f342dcd in r_core_file_open (r=0x0, file=0x100000000 <Address 0x100000000 out of bounds>, mode=0, loadaddr=25271952) at file.c:320
(gdb) x/i $pc
=> 0x7f019b69f99a <strlen+42>: movdqu (%rax),%xmm12

Reply to this email directly or view it on GitHub.

@radare radare closed this as completed in a34f3d5 Jan 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants