Date: Fri, 13 Mar 2026 09:14:20 +0000 From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Qi Wang <interwq@gwu.edu> Subject: git: b4d8d9bde083 - stable/15 - rallocx path: only set errno on the realloc case. Message-ID: <69b3d56c.3d5bd.33fda24b@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b4d8d9bde083b466bc0728c6400cf5e6439f44e3 commit b4d8d9bde083b466bc0728c6400cf5e6439f44e3 Author: Qi Wang <interwq@gwu.edu> AuthorDate: 2026-03-03 11:55:23 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2026-03-13 09:13:16 +0000 rallocx path: only set errno on the realloc case. PR: 291677 Obtained from: jemalloc (commit 83b075789b4239035931c1ee212576d00153bbf0) 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 (cherry picked from commit 2c5cd07828ad76c332e3bedc29fc641809e85396) --- contrib/jemalloc/src/jemalloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/jemalloc/src/jemalloc.c b/contrib/jemalloc/src/jemalloc.c index 352c18870e0b..edf23b9801b4 100644 --- a/contrib/jemalloc/src/jemalloc.c +++ b/contrib/jemalloc/src/jemalloc.c @@ -3561,7 +3561,9 @@ do_rallocx(void *ptr, size_t size, int flags, bool is_realloc) { return p; label_oom: - set_errno(ENOMEM); + if (is_realloc) { + 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?69b3d56c.3d5bd.33fda24b>
