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

Bug#473812: libc6: calloc returns non-zero memory areas when mlockall is being used



Upstream bug: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6958
This is the commit that was used to fix Red Hat bug 405781:
http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=4cd4c5d6a28c4fbdc86651c4578f4c4f24efce08

Using your test case, I confirm I can reproduce the issue with glibc 2.7-18lenny2 x86_64.
With your test case, I cannot reproduce the issue with Red Hat Enterprise Linux
glibc-2.5-24.x86_64 which includes the above patch:

# ./debbug473812 
test the calloc bug..
test , n=1000
test , n=1000
test , n=1000
test , n=1000
test , n=1000
test , n=1000
test , n=1000
test , n=1000
test , n=1000
test , n=1000
Memory locked
Memory locked
Memory locked
Memory locked
Memory locked
test finished
allocated 32502000 bytes

This suggest the above patch indeeds fixes this issue although upstream bug
is still open and madvise() return value is still not checked.





Reply to: