libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] [patch] Remove unnecessary calls to labs()


From: Paul Pluzhnikov
Subject: Re: [Libunwind-devel] [patch] Remove unnecessary calls to labs()
Date: Wed, 22 Oct 2014 11:26:05 -0700

Re-sending from non-DKIM-forcing account, so the message has a better
chance of reaching mailing list recipients.

On Wed, Oct 22, 2014 at 11:23 AM, Paul Pluzhnikov
<address@hidden> wrote:
> On Tue, Aug 12, 2014 at 10:58 PM, Arun Sharma <address@hidden> wrote:
>>
>> Looks good. Should show up in git in a couple of days.
>
> We've just traced a large memory increase to that patch (Google ref:
> b/18069427).
> It appears that labs() was there for a good reason.
>
> Sorry about that :-(
>
> For the curious:
>
>   unsigned long u1 = ~0UL;
>   unsigned long u2 = labs(u1);
>
>   assert(u1 != u2);  // labs on unsigned *may* have an effect, despite
> what Clang says.
>
> Attached patch suppresses the Clang warning, while still keeping the
> original behavior (which I believe to be correct).
>
> Thanks,
> --
> Paul Pluzhnikov



-- 
Paul Pluzhnikov

Attachment: labs.patch.txt
Description: Text document


reply via email to

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