https://bugs.kde.org/show_bug.cgi?id=487862

Mark Wielaard <m...@klomp.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m...@klomp.org

--- Comment #4 from Mark Wielaard <m...@klomp.org> ---
(In reply to John Reiser from comment #0)
> On Linux, when the brk() system call adds new pages to the address space,
> then those pages are guaranteed to be all-zero, but memcheck thinks the
> bytes are Undefined.

I think this is the basic problem. It says if it adds "new pages" then those
pages are guaranteed to be all-zero. But if the pages already existed and brk()
just gives them back those aren't guaranteed to be all-zero but can contain
whatever was there before.

Also note that the man7 manpage for brk() nor the glibc manual make any claims
about the memory area being initialized:
https://man7.org/linux/man-pages/man2/brk.2.html
https://sourceware.org/glibc/manual/latest/html_node/Resizing-the-Data-Segment.html

So it seems reasonable for memcheck to assume the area exposed by brk() is
undefined.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to