Skip to content

Commit

Permalink
[Enhancement] Remove the size assert of je_nallocx (#39293)
Browse files Browse the repository at this point in the history
Signed-off-by: trueeyu <lxhhust350@qq.com>
(cherry picked from commit b328767)
  • Loading branch information
trueeyu authored and mergify[bot] committed Jan 18, 2024
1 parent 5957043 commit 8a81c7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions thirdparty/download-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ fi
cd $TP_SOURCE_DIR/$JEMALLOC_SOURCE
if [ ! -f $PATCHED_MARK ] && [ $JEMALLOC_SOURCE = "jemalloc-5.3.0" ]; then
patch -p0 < $TP_PATCH_DIR/jemalloc_hook.patch
patch -p0 < $TP_PATCH_DIR/jemalloc_nallocx.patch
touch $PATCHED_MARK
fi
cd -
Expand Down
11 changes: 11 additions & 0 deletions thirdparty/patches/jemalloc_nallocx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/jemalloc.c 2022-05-07 02:29:14.000000000 +0800
+++ src/jemalloc.c 2024-01-17 16:13:16.063123457 +0800
@@ -3960,8 +3960,6 @@ je_nallocx(size_t size, int flags) {
size_t usize;
tsdn_t *tsdn;

- assert(size != 0);
-
if (unlikely(malloc_init())) {
LOG("core.nallocx.exit", "result: %zu", ZU(0));
return 0;

0 comments on commit 8a81c7c

Please sign in to comment.