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

Re: [Xen-devel] [PATCH] fix uninitialized variable error in do_poll()



>>> On 05.10.18 at 13:43, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 05/10/18 12:25, Wei Liu wrote:
>> On Fri, Oct 05, 2018 at 05:22:29AM -0600, Jan Beulich wrote:
>>>>>> On 05.10.18 at 12:28, <wei.liu2@xxxxxxxxxx> wrote:
>>>> On Fri, Oct 05, 2018 at 04:12:10AM -0600, Jan Beulich wrote:
>>>>> Now that CONFIG_HVM can (and should) be turned off for the shim, gcc 8.2
>>>>> apparently is no longer sure that "port" is indeed initialized at
>>>>>
>>>>>     if ( sched_poll->nr_ports == 1 )
>>>>>         v->poll_evtchn = port;
>>>>>
>>>>> It doesn't look to be impossible for the compiler to prove it is not,
>>>>> but we also can't rely on that to be the case. Add an initializer.
>>>>>
>>>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>> TBH I fail to see how CONFIG_HVM would affect do_poll. Also there is
>>>> already build test with gcc 8.2 which never discovered the issue you
>>>> described.
>>> I can't explain the sudden diagnostic too (without taking apart what
>>> exactly the compiler does), but the same config (just with HVM=y)
>>> built fine before. Without any further insight (which I don't think is
>>> worth the time) I don't see how I could improve the description.
>> Oh well.
>>
>> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> 
> TBH, I'm not sure that relying on DCE is a good longterm option.

Well, we'll have too see how well it fares. If we get into increasing
trouble, we may indeed want to ...

> It will almost certainly break the build at -O0,

... allow for this.

> and our code really should build at all optimisation levels.

I'd say it is us to establish how much optimization we want to
support being enabled.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.