[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:23:32 -0700 |
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
labs.patch.txt
Description: Text document
- Re: [Libunwind-devel] [patch] Remove unnecessary calls to labs(),
Paul Pluzhnikov <=