Set errno to ENOMEM on rallocx() OOM failures

realloc() and rallocx() shares path, and realloc() should set errno to
ENOMEM upon OOM failures.

PR:		291677
Obtained from:	jemalloc (commit 38056fea64c34ca4fef0a16212776eaa4de80b78)
Fixes:		c43cad8717 ("jemalloc: Merge from jemalloc 5.3.0 vendor branch")
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2059
This commit is contained in:
Juhyung Park
2026-03-03 09:59:33 +00:00
committed by Brooks Davis
parent 105869a2c7
commit 5583b64f23
+1
View File
@@ -3561,6 +3561,7 @@ do_rallocx(void *ptr, size_t size, int flags, bool is_realloc) {
return p;
label_oom:
set_errno(ENOMEM);
if (config_xmalloc && unlikely(opt_xmalloc)) {
malloc_write("<jemalloc>: Error in rallocx(): out of memory\n");
abort();