Closed Kyle-Kyle closed 5 years ago
Another possibility is to verify the existance of argv[0], in python, right before we launch qemu (after chdir to the temp directory). I think that's a reasonable solution.
But a patch to qemu is the easiest. The line to modify is linux-user/elfload.c:2717 in the qemu version we have, and it's a one-line diff. Then we can make it dump to /tmp/something, and we're home free!
On Tue, Oct 30, 2018 at 8:47 PM Audrey Dutcher notifications@github.com wrote:
@rhelmot commented on this pull request.
In tracer/qemu_runner.py https://github.com/angr/tracer/pull/62#discussion_r229556080:
@@ -64,13 +63,15 @@ def init(
if type(input) not in (bytes, TracerPoV): raise RunnerEnvironmentError("Input for tracing should be either a bytestring or a TracerPoV for CGC PoV file.")
- if project or argv or library_path:
- l.warning('Only absolute path is allowed')
warn_once won't do anything since you typically only do one trace per process. Kyle, please work with me here - this is not a gigantic issue. A better solution would be to make stderr and stdout available. stdout is available rn, stderr is discarded, that could be fixed.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/angr/tracer/pull/62#discussion_r229556080, or mute the thread https://github.com/notifications/unsubscribe-auth/ADSzl2PwbMnwI0f99HT9na6VSMlb5Iu_ks5uqR1MgaJpZM4YCwY8 .
I think a patch to qemu is the cleanest solution. I will try it tomorrow. And then we can remove the chdir part. What do you think @rhelmot ?
Yes, that is of course the best solution.
use
mkstemp
instead ofmktemp
. According to https://docs.python.org/3/library/tempfile.html,mktemp
is already deprecated. And somehow it does not create files and raise an error on my computer.attempt to fix issues related to relative path.
initialize the information we may access later. I'm not sure how we should initialize it actually.