-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
r2 -a tms320 - -qc "pd 1"
segfault (via @Maijin)
- Loading branch information
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 comments
on commit fe7b7c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See 180d5b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error is still here:
┌─[ xvilka@xxlaptop ] [ 1:02:59 ] ~
└>r2 -e scr.color=false -a tms320 /bin/ls -qc "pd 1"
;-- entry0:
0x004047f5 31ed || MIN AR6, AR5
┌─[ xvilka@xxlaptop ] [ 1:02:59 ] ~
└>r2 -a tms320 /bin/ls -qc "pd 1"
Segmentation fault
┌─[ xvilka@xxlaptop ] [ 1:02:59 ] ~
└>gdb r2
GNU gdb (Gentoo 7.8.2 vanilla) 7.8.2
Reading symbols from r2...Reading symbols from /usr/lib64/debug//usr/bin/radare2.debug...done.
done.
gdb$ run -a tms320 /bin/ls -qc "pd 1"
Starting program: /usr/bin/r2 -a tms320 /bin/ls -qc "pd 1"
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 "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
-----------------------------------------------------------------------------------------------------------------------[regs]
RAX: 0x0000000000000000 RBX: 0x00007FFFF76B4900 RBP: 0x00007FFFFFFFBE30 RSP: 0x00007FFFFFFFBDD8 o d I t S z A p C
RDI: 0x0000000000000000 RSI: 0x00007FFFF433BCC8 RDX: 0x00000000006CC800 RCX: 0x0000000000000000 RIP: 0x00007FFFF402856A
R8 : 0x00000000FFFFFFFF R9 : 0x00000000006CC810 R10: 0x313B353B38335B1B R11: 0x00007FFFF4101BC0 R12: 0x0000000000402950
R13: 0x0000000000000000 R14: 0x0000000000000000 R15: 0x0000000000000000
CS: 0033 DS: 0000 ES: 0000 FS: 0000 GS: 0000 SS: 002B
-----------------------------------------------------------------------------------------------------------------------[code]
=> 0x7ffff402856a <strlen+42>: movdqu (%rax),%xmm12
0x7ffff402856f <strlen+47>: pcmpeqb %xmm8,%xmm12
0x7ffff4028574 <strlen+52>: pmovmskb %xmm12,%edx
0x7ffff4028579 <strlen+57>: test %edx,%edx
0x7ffff402857b <strlen+59>: je 0x7ffff4028581 <strlen+65>
0x7ffff402857d <strlen+61>: bsf %edx,%eax
0x7ffff4028580 <strlen+64>: retq
0x7ffff4028581 <strlen+65>: and $0xfffffffffffffff0,%rax
-----------------------------------------------------------------------------------------------------------------------------
strlen () at ../sysdeps/x86_64/strlen.S:106
106 movdqu (%rax), %xmm12
gdb$ bt
#0 strlen () at ../sysdeps/x86_64/strlen.S:106
#1 0x00007ffff7b99760 in colorize_asm_string (core=0x6075c0 <r>, ds=0xa21cb0) at disasm.c:374
#2 0x00007ffff7b9980f in handle_build_op_str (core=0x6075c0 <r>, ds=0xa21cb0) at disasm.c:385
#3 0x00007ffff7b9f048 in r_core_print_disasm (p=0x66c3b0, core=0x6075c0 <r>, addr=0x4047f5, buf=0x6cc680 "1\355I\211\321^H\211\342H\203\344\360PTI\307\300\240
A", len=0xa, l=0x1, invbreak=0x0, cbytes=0x0) at disasm.c:1858
#4 0x00007ffff7b581b1 in cmd_print (data=0x6075c0 <r>, input=0x6ccb61 "d 1") at cmd_print.c:1591
#5 0x00007ffff7b87d3b in r_cmd_call (cmd=0x6a97e0, input=0x6ccb60 "pd 1") at cmd_api.c:179
#6 0x00007ffff7b6631b in r_core_cmd_subst_i (core=0x6075c0 <r>, cmd=0x6ccb60 "pd 1") at cmd.c:1366
#7 0x00007ffff7b6477a in r_core_cmd_subst (core=0x6075c0 <r>, cmd=0x6ccb60 "pd 1") at cmd.c:919
#8 0x00007ffff7b66ffd in r_core_cmd (core=0x6075c0 <r>, cstr=0x7fffffffdeb3 "pd 1", log=0x0) at cmd.c:1572
#9 0x00007ffff7b67624 in r_core_cmd0 (user=0x6075c0 <r>, cmd=0x7fffffffdeb3 "pd 1") at cmd.c:1695
#10 0x0000000000404d50 in main (argc=0x6, argv=0x7fffffffdb28, envp=0x7fffffffdb60) at radare2.c:669
gdb$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix your system :p
… On 16 Feb 2015, at 21:36, Anton Kochkov ***@***.*** wrote:
Error is still here:
┌─[ ***@***.*** ] [ 1:02:59 ] ~
└>r2 -e scr.color=false -a tms320 /bin/ls -qc "pd 1"
;-- entry0:
0x004047f5 31ed || MIN AR6, AR5
┌─[ ***@***.*** ] [ 1:02:59 ] ~
└>r2 -a tms320 /bin/ls -qc "pd 1"
Segmentation fault
┌─[ ***@***.*** ] [ 1:02:59 ] ~
└>gdb r2
GNU gdb (Gentoo 7.8.2 vanilla) 7.8.2
Reading symbols from r2...Reading symbols from /usr/lib64/debug//usr/bin/radare2.debug...done.
done.
gdb$ run -a tms320 /bin/ls -qc "pd 1"
Starting program: /usr/bin/r2 -a tms320 /bin/ls -qc "pd 1"
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 "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
-----------------------------------------------------------------------------------------------------------------------[regs]
RAX: 0x0000000000000000 RBX: 0x00007FFFF76B4900 RBP: 0x00007FFFFFFFBE30 RSP: 0x00007FFFFFFFBDD8 o d I t S z A p C
RDI: 0x0000000000000000 RSI: 0x00007FFFF433BCC8 RDX: 0x00000000006CC800 RCX: 0x0000000000000000 RIP: 0x00007FFFF402856A
R8 : 0x00000000FFFFFFFF R9 : 0x00000000006CC810 R10: 0x313B353B38335B1B R11: 0x00007FFFF4101BC0 R12: 0x0000000000402950
R13: 0x0000000000000000 R14: 0x0000000000000000 R15: 0x0000000000000000
CS: 0033 DS: 0000 ES: 0000 FS: 0000 GS: 0000 SS: 002B
-----------------------------------------------------------------------------------------------------------------------[code]
=> 0x7ffff402856a <strlen+42>: movdqu (%rax),%xmm12
0x7ffff402856f <strlen+47>: pcmpeqb %xmm8,%xmm12
0x7ffff4028574 <strlen+52>: pmovmskb %xmm12,%edx
0x7ffff4028579 <strlen+57>: test %edx,%edx
0x7ffff402857b <strlen+59>: je 0x7ffff4028581 <strlen+65>
0x7ffff402857d <strlen+61>: bsf %edx,%eax
0x7ffff4028580 <strlen+64>: retq
## 0x7ffff4028581 <strlen+65>: and $0xfffffffffffffff0,%rax
strlen () at ../sysdeps/x86_64/strlen.S:106
106 movdqu (%rax), %xmm12
gdb$ bt
# 0 strlen () at ../sysdeps/x86_64/strlen.S:106
# 1 0x00007ffff7b99760 in colorize_asm_string (core=0x6075c0 <r>, ds=0xa21cb0) at disasm.c:374
# 2 0x00007ffff7b9980f in handle_build_op_str (core=0x6075c0 <r>, ds=0xa21cb0) at disasm.c:385
# 3 0x00007ffff7b9f048 in r_core_print_disasm (p=0x66c3b0, core=0x6075c0 <r>, addr=0x4047f5, buf=0x6cc680 "1\355I\211\321^H\211\342H\203\344\360PTI\307\300\240
A", len=0xa, l=0x1, invbreak=0x0, cbytes=0x0) at disasm.c:1858
# 4 0x00007ffff7b581b1 in cmd_print (data=0x6075c0 <r>, input=0x6ccb61 "d 1") at cmd_print.c:1591
# 5 0x00007ffff7b87d3b in r_cmd_call (cmd=0x6a97e0, input=0x6ccb60 "pd 1") at cmd_api.c:179
# 6 0x00007ffff7b6631b in r_core_cmd_subst_i (core=0x6075c0 <r>, cmd=0x6ccb60 "pd 1") at cmd.c:1366
# 7 0x00007ffff7b6477a in r_core_cmd_subst (core=0x6075c0 <r>, cmd=0x6ccb60 "pd 1") at cmd.c:919
# 8 0x00007ffff7b66ffd in r_core_cmd (core=0x6075c0 <r>, cstr=0x7fffffffdeb3 "pd 1", log=0x0) at cmd.c:1572
# 9 0x00007ffff7b67624 in r_core_cmd0 (user=0x6075c0 <r>, cmd=0x7fffffffdeb3 "pd 1") at cmd.c:1695
# 10 0x0000000000404d50 in main (argc=0x6, argv=0x7fffffffdb28, envp=0x7fffffffdb60) at radare2.c:669
gdb$
—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@radare - system was ok, I was debugging the wrong version of radare2 (older, without strdup) with the new sources (dwarf). All OK now.
Should it be "if (!scol2) scol2 = strdup ("");"? Or I'm missing something?