bug-hurd
[Top][All Lists]
Advanced

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

Re: Upstreaming the glibc Hurd port


From: Zack Weinberg
Subject: Re: Upstreaming the glibc Hurd port
Date: Tue, 3 Apr 2018 18:07:43 -0400

On Tue, Apr 3, 2018 at 5:58 PM, Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Joseph Myers, on mar. 03 avril 2018 21:48:32 +0000, wrote:
>> The build for i686-gnu also fails using GCC 6 branch with
>> build-many-glibcs.py:
>>
>> hurdsig.c: In function 'interrupted_reply_port_location.isra.1':
>> hurdsig.c:250:39: error: 'portloc' may be used uninitialized in this 
>> function [-Werror=maybe-uninitialized]
>>    *(volatile mach_port_t *) portloc = *portloc;
>>                                        ^~~~~~~~
>>
>> I haven't investigated whether this warning is valid, or whether it's
>> bogus
>
> Well, it's completely bogus: portloc is initialized just above. I don't
> understand why it wouldn't see that.

I think it thinks the *value pointed-to by portloc* is uninitialized.
Writing that value to a volatile memory location (which happens to be
the same memory location, but you specifically told it not to pay
attention to that with the volatile cast) is therefore invalid.

I don't know this code well enough to suggest what you might could do
about that.  Since the warning does not happen with GCC 7 or 8 I would
be fine with suppressing the diagnostic.

zw



reply via email to

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