From 23f6e103c871b4db5b315caf1a8d5c46d9675691 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Mon, 14 Sep 2015 23:32:26 -0700 Subject: [PATCH] Fix ixallocx_prof_sample() argument order reversal. Fix ixallocx_prof() to pass usize_max and zero to ixallocx_prof_sample() in the correct order. --- ChangeLog | 2 ++ src/jemalloc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 21edac0f..95a4ac52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,8 @@ brevity. Much more detail can be found in the git revision history: the result throughout the relevant functions that handle an allocation event. Also add a missing check in prof_realloc(). These fixes protect allocation events against concurrent prof_active changes. + - Fix ixallocx_prof() to pass usize_max and zero to ixallocx_prof_sample() in + the correct order. * 4.0.0 (August 17, 2015) diff --git a/src/jemalloc.c b/src/jemalloc.c index a7c7a03d..2566f9b6 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -2299,7 +2299,7 @@ ixallocx_prof(tsd_t *tsd, void *ptr, size_t old_usize, size_t size, tctx = prof_alloc_prep(tsd, usize_max, prof_active, false); if (unlikely((uintptr_t)tctx != (uintptr_t)1U)) { usize = ixallocx_prof_sample(ptr, old_usize, size, extra, - alignment, zero, usize_max, tctx); + alignment, usize_max, zero, tctx); } else { usize = ixallocx_helper(ptr, old_usize, size, extra, alignment, zero);