[PATCH 2/4] Add a signal-safe malloc replacement
Paul Pluzhnikov
ppluzhnikov@google.com
Thu Dec 19 19:40:00 GMT 2013
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);
More information about the Libc-alpha
mailing list