public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug malloc/27870] New: MALLOC_CHECK_ causes realloc(valid_ptr, TOO_LARGE) to not set ENOMEM
@ 2021-05-15 16:43 P at draigBrady dot com
2021-05-17 19:43 ` [Bug malloc/27870] " schwab@linux-m68k.org
2021-05-19 7:47 ` P at draigBrady dot com
0 siblings, 2 replies; 3+ messages in thread
From: P at draigBrady dot com @ 2021-05-15 16:43 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27870
Bug ID: 27870
Summary: MALLOC_CHECK_ causes realloc(valid_ptr, TOO_LARGE) to
not set ENOMEM
Product: glibc
Version: 2.33
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: malloc
Assignee: unassigned at sourceware dot org
Reporter: P at draigBrady dot com
Target Milestone: ---
With MALLOC_CHECK_ env var set to valid values (1,2, or 3),
the realloc implementation doesn't set ENOMEM when it should.
Running the following shows that errno is incorrectly set to 0:
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
int main ()
{
void *p;
void* p2 = malloc ((unsigned long) 1);
errno = 0;
p = realloc (p2, (unsigned long) PTRDIFF_MAX + 1);
fprintf (stderr, "p=%p errno=%d\n", p, errno);
return 0;
}
gcc realloc.c
MALLOC_CHECK_=1 ./a.out
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug malloc/27870] MALLOC_CHECK_ causes realloc(valid_ptr, TOO_LARGE) to not set ENOMEM
2021-05-15 16:43 [Bug malloc/27870] New: MALLOC_CHECK_ causes realloc(valid_ptr, TOO_LARGE) to not set ENOMEM P at draigBrady dot com
@ 2021-05-17 19:43 ` schwab@linux-m68k.org
2021-05-19 7:47 ` P at draigBrady dot com
1 sibling, 0 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2021-05-17 19:43 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27870
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |2.34
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
Fixed in 2.34
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug malloc/27870] MALLOC_CHECK_ causes realloc(valid_ptr, TOO_LARGE) to not set ENOMEM
2021-05-15 16:43 [Bug malloc/27870] New: MALLOC_CHECK_ causes realloc(valid_ptr, TOO_LARGE) to not set ENOMEM P at draigBrady dot com
2021-05-17 19:43 ` [Bug malloc/27870] " schwab@linux-m68k.org
@ 2021-05-19 7:47 ` P at draigBrady dot com
1 sibling, 0 replies; 3+ messages in thread
From: P at draigBrady dot com @ 2021-05-19 7:47 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27870
--- Comment #2 from Pádraig Brady <P at draigBrady dot com> ---
https://sourceware.org/git/?p=glibc.git;a=commit;h=c6b6b4f2
Thank you
--
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:[~2021-05-19 7:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 16:43 [Bug malloc/27870] New: MALLOC_CHECK_ causes realloc(valid_ptr, TOO_LARGE) to not set ENOMEM P at draigBrady dot com
2021-05-17 19:43 ` [Bug malloc/27870] " schwab@linux-m68k.org
2021-05-19 7:47 ` P at draigBrady 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).