This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/4] Add a signal-safe malloc replacement
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Andrew Hunter <ahh at google dot com>, OndÅej BÃlka <neleai at seznam dot cz>, GNU C Library <libc-alpha at sourceware dot org>, "Carlos O'Donell" <carlos at redhat dot com>
- Date: Thu, 19 Dec 2013 10:53:15 -0800
- Subject: Re: [PATCH 2/4] Add a signal-safe malloc replacement
- Authentication-results: sourceware.org; auth=none
- References: <1386273671-13010-1-git-send-email-ahh at google dot com> <1386722143-10513-1-git-send-email-ahh at google dot com> <1386722143-10513-2-git-send-email-ahh at google dot com> <20131211100309 dot GA24512 at domone dot podge> <CALoOobMKYyD7G7fbYHq2aqx32S_QMs19DZY2YhJ-JA4_d4717A at mail dot gmail dot com> <CADroS=7LJ4uKGB30jsNn2xV5Dxr7eZ24H3NScHUCYWORUnMTfQ at mail dot gmail dot com> <CALoOobP0xGCB_6Vf9uTizqctJP1r9aW2eRoBFNeaHHASWd75mg at mail dot gmail dot com> <CALoOobOT_os7AuCB+_+fy+u9LOaRajBLoQKgf20vKeqYTxRJhg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1312191656360 dot 8877 at digraph dot polyomino dot org dot uk> <CALoOobOCcMf+7=uvdunjKTADWDpBn=6jz2iYBeKZy0aR8Z9-cg at mail dot gmail dot com> <CALoOobN3V5+jzgUZFStrvrG9Us1CGaFnyhMFjvtCd97fMznWkQ at mail dot gmail dot com>
On Thu, Dec 19, 2013 at 10:29 AM, Paul Pluzhnikov
<ppluzhnikov@google.com> wrote:
> Attached patch committed as obvious.
And I've got power of 2 check wrong :-(
Fixed.
--
Paul Pluzhnikov
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -396,7 +396,7 @@ __signal_safe_memalign (size_t boundary, size_t size)
boundary = sizeof (*header);
/* Boundary must be a power of two. */
- if ((boundary & (boundary - 1)) == 0)
+ if (!powerof2 (boundary))
return NULL;
size_t pg = GLRO (dl_pagesize);