Send inn-workers mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."


Today's Topics:

   1. Re: msync on Hurd, dev_t on MIPS (Julien ?LIE)


----------------------------------------------------------------------

Message: 1
Date: Thu, 5 May 2016 15:21:35 +0200
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: msync on Hurd, dev_t on MIPS
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi Russ,

> Unfortunately, that doesn't have the same meaning if dev_t is an unsigned
> long long.  That takes -1, converts it to an unsigned long (which means
> it's now the positive integer ULONG_MAX) and then assigns it to an
> unsigned long long field, where it might be a perfectly valid device
> identifier in the middle of the available device number range rather than
> a sentinel "invalid device" number as intended.  :(  Chances of a
> collision are thankfully minute, but it's not formally correct.
>
> It *shouldn't* matter, because we always compare against st_ino as well,
> but the formally correct fix is probably to figure out the size of the
> struct stat st_dev field in Autoconf and explicitly cast -1 to that size,
> whatever it is.

OK, understood.  Thanks for the detailed explanation!


> Not sure if it's worth the trouble, though.

Agreed.  I've just added a comment in the source code to mention that a 
few architectures define dev_t to be 64-bits whereas st_dev is 32-bits, 
but that does not matter in our use cases.

-- 
Julien ?LIE

? ? Les sangliers appr?cient mieux que toi ma musique !
   ? C'est normal, tu chantes comme un cochon !!! ? (Ast?rix)


------------------------------

_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers

End of inn-workers Digest, Vol 84, Issue 1
******************************************

Reply via email to