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

cg filename unstable #2034

Closed
zonkzonk opened this issue Feb 3, 2015 · 6 comments
Closed

cg filename unstable #2034

zonkzonk opened this issue Feb 3, 2015 · 6 comments

Comments

@zonkzonk
Copy link
Contributor

zonkzonk commented Feb 3, 2015

morn,

somehow I get ocasionally faults with cg/cgo:

[0x004048bf]> cgo /etc/passwd-
Segmentation fault (core dumped)

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000024c06d0 in ?? ()
(gdb) bt
#0  0x00000000024c06d0 in ?? ()
#1  0x00007f7ec79371a8 in r_bin_object_new (binfile=0x26ba990, plugin=0x24c0540, baseaddr=0, loadaddr=0, offset=0, sz=1277) at bin.c:855
#2  0x00007f7ec79378fc in r_bin_file_new_from_bytes (bin=0x253b480, file=0x26ba7d0 "/etc/passwd-", 
    bytes=0x26b2580 "root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:/bin/false\ndaemon:x:2:2:daemon:/sbin:/bin/false\nmail:x:8:12:mail:/var/spool/mail:/bin/false\nftp:x:14:11:ftp:/srv/ftp:/bin/false\nhttp:x:33:33:http:/sr"..., sz=1277, file_sz=1277, rawstr=0, baseaddr=0, loadaddr=0, fd=12, 
    pluginname=0x0, xtrname=0x0, offset=0) at bin.c:1000
#3  0x00007f7ec7936658 in r_bin_load_io_at_offset_as_sz (bin=0x253b480, desc=0x26ba860, baseaddr=0, loadaddr=0, xtr_idx=0, offset=0, name=0x0, sz=1277)
    at bin.c:594
#4  0x00007f7ec7936709 in r_bin_load_io_at_offset_as (bin=0x253b480, desc=0x26ba860, baseaddr=0, loadaddr=0, xtr_idx=0, offset=0, name=0x0) at bin.c:614
#5  0x00007f7ec793611f in r_bin_load_io (bin=0x253b480, desc=0x26ba860, baseaddr=0, loadaddr=0, xtr_idx=0) at bin.c:498
#6  0x00007f7ec849dbcc in r_core_file_do_load_for_io_plugin (r=0x24c0a90, baseaddr=0, loadaddr=0) at file.c:342
#7  0x00007f7ec849dfb6 in r_core_bin_load (r=0x24c0a90, filenameuri=0x253a7b4 "/etc/passwd-", baddr=0) at file.c:474
#8  0x00007f7ec8474ef2 in cmd_cmp (data=0x607980 <r>, input=0x253a7b1 "go /etc/passwd-") at cmd_cmp.c:494
#9  0x00007f7ec84bc1da in r_cmd_call (cmd=0x20ad940, input=0x253a7b0 "cgo /etc/passwd-") at cmd_api.c:179
#10 0x00007f7ec849b198 in r_core_cmd_subst_i (core=0x607980 <r>, cmd=0x253a7b0 "cgo /etc/passwd-", colon=0x0) at cmd.c:1437
#11 0x00007f7ec84998b3 in r_core_cmd_subst (core=0x607980 <r>, cmd=0x253a7b0 "cgo /etc/passwd-") at cmd.c:981
#12 0x00007f7ec849bb47 in r_core_cmd (core=0x607980 <r>, cstr=0x20d97c0 "cgo /etc/passwd-", log=1) at cmd.c:1624
#13 0x00007f7ec8462481 in r_core_prompt_exec (r=0x607980 <r>) at core.c:1013
#14 0x0000000000404f58 in main (argc=2, argv=0x7fff7a38a1b8, envp=0x7fff7a38a1d0) at radare2.c:741
(gdb) i r
rax            0x24c06d0        38536912
rbx            0x253b480        39040128
rcx            0x26b2fa0        40578976
rdx            0x0      0
rsi            0x4fd    1277
rdi            0x26b2a90        40577680
rbp            0x7fff7a388f40   0x7fff7a388f40
rsp            0x7fff7a388ed8   0x7fff7a388ed8
r8             0x26b98e0        40605920
r9             0xd70    3440
r10            0x26bac20        40610848
r11            0x622f3a746f6f722f       7074937811382530607
r12            0x402a30 4205104
r13            0x7fff7a38a1b0   140735243919792
r14            0x0      0
r15            0x0      0
rip            0x24c06d0        0x24c06d0
eflags         0x10246  [ PF ZF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0

Greetings
--zlul

@radare
Copy link
Collaborator

radare commented Feb 3, 2015

try again
On 02/03/2015 11:18 PM, zonkzonk wrote:

morn,

somehow I get ocasionally faults with cg/cgo:

[0x004048bf]> cgo /etc/passwd-
Segmentation fault (core dumped)

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000024c06d0 in ?? ()
(gdb) bt
#0  0x00000000024c06d0 in ?? ()
#1  0x00007f7ec79371a8 in r_bin_object_new (binfile=0x26ba990, plugin=0x24c0540, baseaddr=0, loadaddr=0, offset=0, sz=1277) at bin.c:855
#2  0x00007f7ec79378fc in r_bin_file_new_from_bytes (bin=0x253b480, file=0x26ba7d0 "/etc/passwd-", 
    bytes=0x26b2580 "root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:/bin/false\ndaemon:x:2:2:daemon:/sbin:/bin/false\nmail:x:8:12:mail:/var/spool/mail:/bin/false\nftp:x:14:11:ftp:/srv/ftp:/bin/false\nhttp:x:33:33:http:/sr"..., sz=1277, file_sz=1277, rawstr=0, baseaddr=0, loadaddr=0, fd=12, 
    pluginname=0x0, xtrname=0x0, offset=0) at bin.c:1000
#3  0x00007f7ec7936658 in r_bin_load_io_at_offset_as_sz (bin=0x253b480, desc=0x26ba860, baseaddr=0, loadaddr=0, xtr_idx=0, offset=0, name=0x0, sz=1277)
    at bin.c:594
#4  0x00007f7ec7936709 in r_bin_load_io_at_offset_as (bin=0x253b480, desc=0x26ba860, baseaddr=0, loadaddr=0, xtr_idx=0, offset=0, name=0x0) at bin.c:614
#5  0x00007f7ec793611f in r_bin_load_io (bin=0x253b480, desc=0x26ba860, baseaddr=0, loadaddr=0, xtr_idx=0) at bin.c:498
#6  0x00007f7ec849dbcc in r_core_file_do_load_for_io_plugin (r=0x24c0a90, baseaddr=0, loadaddr=0) at file.c:342
#7  0x00007f7ec849dfb6 in r_core_bin_load (r=0x24c0a90, filenameuri=0x253a7b4 "/etc/passwd-", baddr=0) at file.c:474
#8  0x00007f7ec8474ef2 in cmd_cmp (data=0x607980 <r>, input=0x253a7b1 "go /etc/passwd-") at cmd_cmp.c:494
#9  0x00007f7ec84bc1da in r_cmd_call (cmd=0x20ad940, input=0x253a7b0 "cgo /etc/passwd-") at cmd_api.c:179
#10 0x00007f7ec849b198 in r_core_cmd_subst_i (core=0x607980 <r>, cmd=0x253a7b0 "cgo /etc/passwd-", colon=0x0) at cmd.c:1437
#11 0x00007f7ec84998b3 in r_core_cmd_subst (core=0x607980 <r>, cmd=0x253a7b0 "cgo /etc/passwd-") at cmd.c:981
#12 0x00007f7ec849bb47 in r_core_cmd (core=0x607980 <r>, cstr=0x20d97c0 "cgo /etc/passwd-", log=1) at cmd.c:1624
#13 0x00007f7ec8462481 in r_core_prompt_exec (r=0x607980 <r>) at core.c:1013
#14 0x0000000000404f58 in main (argc=2, argv=0x7fff7a38a1b8, envp=0x7fff7a38a1d0) at radare2.c:741
(gdb) i r
rax            0x24c06d0        38536912
rbx            0x253b480        39040128
rcx            0x26b2fa0        40578976
rdx            0x0      0
rsi            0x4fd    1277
rdi            0x26b2a90        40577680
rbp            0x7fff7a388f40   0x7fff7a388f40
rsp            0x7fff7a388ed8   0x7fff7a388ed8
r8             0x26b98e0        40605920
r9             0xd70    3440
r10            0x26bac20        40610848
r11            0x622f3a746f6f722f       7074937811382530607
r12            0x402a30 4205104
r13            0x7fff7a38a1b0   140735243919792
r14            0x0      0
r15            0x0      0
rip            0x24c06d0        0x24c06d0
eflags         0x10246  [ PF ZF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0

Greetings
--zlul


Reply to this email directly or view it on GitHub:
#2034

@zonkzonk
Copy link
Contributor Author

zonkzonk commented Feb 3, 2015

cgo fixed, cg not yet: r2[22166]: segfault at 61 ip 0000000000000061 sp 00007ffff3aa1bc8 error 14 in radare2[400000+7000]

try: af;pdf; cgo /etc/passwd-; cg /etc/passwd-

@radare
Copy link
Collaborator

radare commented Feb 3, 2015

cant reproduce, can you share a backtrace or valgrind?
On 02/03/2015 11:41 PM, zonkzonk wrote:

cgo fixed, cg not yet: r2[22166]: segfault at 61 ip 0000000000000061 sp 00007ffff3aa1bc8 error 14 in radare2[400000+7000]

try: af;pdf; cgo /etc/passwd-; cg /etc/passwd-


Reply to this email directly or view it on GitHub:
#2034 (comment)

@zonkzonk
Copy link
Contributor Author

zonkzonk commented Feb 3, 2015

seems like race condition, can't reproduce in 74c3707 for now.

@radare
Copy link
Collaborator

radare commented Feb 3, 2015

closing?
On 02/03/2015 11:47 PM, zonkzonk wrote:

seems like race condition, can't reproduce in 74c3707 for now.


Reply to this email directly or view it on GitHub:
#2034 (comment)

@zonkzonk
Copy link
Contributor Author

zonkzonk commented Feb 3, 2015

ok

@zonkzonk zonkzonk closed this as completed Feb 3, 2015
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