coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tail: avoid theoretically undefined behavior


From: Pádraig Brady
Subject: Re: [PATCH] tail: avoid theoretically undefined behavior
Date: Wed, 28 Dec 2011 21:42:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 12/28/2011 09:30 PM, Jim Meyering wrote:
> Pádraig Brady wrote:
> 
>> On 12/28/2011 05:56 PM, Jim Meyering wrote:
>>> Can anyone name a real system on which forming a pointer like this,
>>> "buffer + (size_t)(-1)" actually provokes a trap or some other real problem?
>>
>> I don't know of particular hardware where this would trap
>> (alpha can be configured to trap on integer overflow I think).
>>
>> Your change is worth it for clarity at least.
> 
> Thanks.
> My only doubt is whether to include the word "theoretically"
> in the one-line summary ;-)

That's appropriate for people scanning the summary,
on the vast majority of systems



reply via email to

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