Bug 7029 - CPU_ALLOC_SIZE() returns wrong value
Summary: CPU_ALLOC_SIZE() returns wrong value
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.8
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-13 03:05 UTC by Michael Kerrisk
Modified: 2014-07-01 21:13 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
test program (360 bytes, text/plain)
2008-11-13 03:07 UTC, Michael Kerrisk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kerrisk 2008-11-13 03:05:17 UTC
On x86-32 at least, CPU_ALLOC_SIZE() returns twice the value that its should. 
For example, CPU_ALLOC_SIZE(8192) returns 2048.  This also causes CPU_ALLOC() to
allocate double the required memory.
Comment 1 Michael Kerrisk 2008-11-13 03:07:24 UTC
Created attachment 3059 [details]
test program

An example run of the attached program demonstrates the problem:

$ ./a.out 8192
CPU_ALLOC_SIZE()=2048
Comment 2 Ulrich Drepper 2008-11-13 19:57:21 UTC
Changed in cvs.