qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 0/2] semihosting: clean up and add --semihost


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v5 0/2] semihosting: clean up and add --semihosting-config arg
Date: Sat, 20 Jun 2015 21:19:27 +0100

On 20 June 2015 at 21:14, Liviu Ionescu <address@hidden> wrote:
>
>> On 20 Jun 2015, at 22:49, Peter Maydell <address@hidden> wrote:
>>
>>> as you can see, it tries to use the kernel name as command line, which 
>>> exceeds the application small buffer size.
>>
>> It only does that if you didn't specify the arguments the new
>> way (at least that is the intention).
>
> what if I do not need to specify any arguments at all, and I want the
> application to know this?

For ARM, that's an empty command string. Does arg='' work in the
new syntax?

>> We need to maintain the
>> old behaviour for back compatibility.
>
> ...
>
>> On 05 Jun 2015, at 18:23, Peter Maydell <address@hidden> wrote:
>>
>>> +            output_size = strlen(semihosting_get_cmdline()) + 1;
>>
>> It looks like semihosting_get_cmdline() can return NULL,
>> in which case this will blow up, I think.
>
> if back compatibility for preserving the bugs was the goal, then it
> was reached, the new version also crashes in cases where there are
> no args and no kernel (for example when the image is loaded via GDB).

Right, we discussed that in code review and concluded that it wasn't
a new bug. I'm happy to accept a patch to fix it, but I figured it
was better to get these patches in rather than go through another
round to incorporate a fix to a problem that already existed in
the current code.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]