Date: Mon, 09 Mar 2026 12:37:50 +0000 From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Juhyung Park <qkrwngud825@gmail.com> Subject: git: 5583b64f230f - main - Set errno to ENOMEM on rallocx() OOM failures Message-ID: <69aebf1e.219b1.569a0a61@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=5583b64f230fe0ea4e3d4bf4566205b521190fbb commit 5583b64f230fe0ea4e3d4bf4566205b521190fbb Author: Juhyung Park <qkrwngud825@gmail.com> AuthorDate: 2026-03-03 09:59:33 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2026-03-09 12:35:25 +0000 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: c43cad871720 ("jemalloc: Merge from jemalloc 5.3.0 vendor branch") MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/2059 --- contrib/jemalloc/src/jemalloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/jemalloc/src/jemalloc.c b/contrib/jemalloc/src/jemalloc.c index e4b183d1a24d..352c18870e0b 100644 --- a/contrib/jemalloc/src/jemalloc.c +++ b/contrib/jemalloc/src/jemalloc.c @@ -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();home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69aebf1e.219b1.569a0a61>
