public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* Issue in man page malloc.3
@ 2022-12-04  9:07 Helge Kreutzmann
  2022-12-04 12:23 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Helge Kreutzmann @ 2022-12-04  9:07 UTC (permalink / raw)
  To: alx.manpages; +Cc: mario.blaettermann, linux-man

Without further ado, the following was found:

Issue:    preserve errno → preserve I<errno>

"If your program uses a private memory allocator, it should do so by "
"replacing B<malloc>(), B<free>(), B<calloc>(), and B<realloc>().  The "
"replacement functions must implement the documented glibc behaviors, "
"including I<errno> handling, size-zero allocations, and overflow checking; "
"otherwise, other library routines may crash or operate incorrectly.  For "
"example, if the replacement I<free>()  does not preserve errno, then "
"seemingly unrelated library routines may fail without having a valid reason "
"in I<errno>.  Private memory allocators may also need to replace other glibc "
"functions; see \"Replacing malloc\" in the glibc manual for details."

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Issue in man page malloc.3
@ 2025-08-24 14:48 Helge Kreutzmann
  2025-08-31 12:08 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Helge Kreutzmann @ 2025-08-24 14:48 UTC (permalink / raw)
  To: alx; +Cc: mario.blaettermann, linux-man

Without further ado, the following was found:

Issue:    enough that → enough, so that

"The behavior of I<realloc(p,\\ 0)> in glibc doesn't conform to any of C99, "
"C11, POSIX.1-2001, POSIX.1-2004, POSIX.1-2008, POSIX.1-2013, POSIX.1-2017, "
"or POSIX.1-2024.  The C17 specification was changed to make it conforming, "
"but that specification made it impossible to write code that reliably "
"determines if the input pointer is freed after I<realloc(p,\\ 0)>, and C23 "
"changed it again to make this undefined behavior, acknowledging that the C17 "
"specification was broad enough that undefined behavior wasn't worse than "
"that."

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

end of thread, other threads:[~2025-08-31 12:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-04  9:07 Issue in man page malloc.3 Helge Kreutzmann
2022-12-04 12:23 ` Alejandro Colomar
  -- strict thread matches above, loose matches on Subject: below --
2025-08-24 14:48 Helge Kreutzmann
2025-08-31 12:08 ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox