[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [ARM] SYS_GET_CMDLINE handling
From: |
Christophe LYON |
Subject: |
[Qemu-devel] [ARM] SYS_GET_CMDLINE handling |
Date: |
Fri, 09 Apr 2010 11:20:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 |
Hello,
I am facing a problem when using qemu-arm, when the target code uses the
SYS_GET_CMDLINE semi-hosting call.
Indeed, in arm-semi.c (line ~376), args are read from
ts->info->host_argv, which in turn has been initialised much earlier in
linuxload.c:load_exec with the value of target_argv.
The problem is that target_argv is freed in main() target code execution.
A quick and dirty fix is not to free target_argv, a better one would be
to re-construct it again from the allocated target memory.
I am surprised to face such an obvious bug, am I missing something?
(The corresponding commit took place in Nov 2006, how could it go
unnoticed for so long?)
Thanks.
Christophe.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [ARM] SYS_GET_CMDLINE handling,
Christophe LYON <=