public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug malloc/16810] New: malloc modifies errno on success
@ 2014-04-05  0:58 mikulas at artax dot karlin.mff.cuni.cz
  2014-04-05  6:57 ` [Bug malloc/16810] " schwab@linux-m68k.org
  2014-06-12 19:46 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: mikulas at artax dot karlin.mff.cuni.cz @ 2014-04-05  0:58 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16810

            Bug ID: 16810
           Summary: malloc modifies errno on success
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: malloc
          Assignee: unassigned at sourceware dot org
          Reporter: mikulas at artax dot karlin.mff.cuni.cz
              Host: arm-linux-gnueabihf
            Target: arm-linux-gnueabihf
             Build: arm-linux-gnueabihf

Created attachment 7532
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7532&action=edit
a simple program that demonstrates that malloc call succeeds and modifies errno

When the brk syscall fails to extend the heap, glibc tries to allocate a new
memory pool using mmap. If mmap succeeds, the block is successfuly allocated
and
returned to the caller - however, in this case, errno is set to ENOMEM.

The attached program demonstrates the problem.

The bug was reproduced on glibc-2.19 on Ununtu Trusy Tahr, glibc-2.13 on Debian
Wheezy and glibc-2.11.3 on Debian Squeeze.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-12 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-05  0:58 [Bug malloc/16810] New: malloc modifies errno on success mikulas at artax dot karlin.mff.cuni.cz
2014-04-05  6:57 ` [Bug malloc/16810] " schwab@linux-m68k.org
2014-06-12 19:46 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).