radareorg/radare2-r2pipe

python r2pipe.open() with no args is opening malloc://512

tfriesen opened this issue · 1 comments

I believe this bug was introduced with the changes made on Dec 6.

Basically, if I call r2pipe.open() with no args, instead of opening the pipe to the running radare2 instance, a new copy of radare2 runs with '-' as the file, which causes it to run malloc://512.

Ex This code:

import r2pipe,os
r = r2pipe.open()
data = r.cmdj("ij")
print data

Always returns this:
[0x00001060]> . test_r2pipe.py
{u'core': {u'humansz': u'512', u'obsz': 0, u'format': u'any', u'fd': 3, u'mode': u'rwx', u'file': u'malloc://512', u'iorw': True, u'type': u'', u'block': 256, u'size': 512}}

See line 47 in open_sync.py.

The variables are being properly set in the call to super(), but they get overwritten in the block of code starting there.

a1ext commented

hi @tfriesen, you are right. Will fix that soon, thanks for reporting that.