All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [ARM] SYS_GET_CMDLINE handling
@ 2010-04-09  9:20 Christophe LYON
  0 siblings, 0 replies; only message in thread
From: Christophe LYON @ 2010-04-09  9:20 UTC (permalink / raw)
  To: qemu-devel

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-09  9:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-09  9:20 [Qemu-devel] [ARM] SYS_GET_CMDLINE handling Christophe LYON

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.