File tree Expand file tree Collapse file tree
build-logic/conventions/src/main/kotlin/com/datadoghq/profiler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,8 +214,12 @@ class ProfilerTestPlugin : Plugin<Project> {
214214 ! PlatformUtils .isMusl() &&
215215 ! testEnv.containsKey(" LD_PRELOAD" )
216216 ) {
217+ val perturbByte = (1 .. 255 ).random()
217218 put(" MALLOC_CHECK_" , " 3" )
218- put(" MALLOC_PERTURB_" , (1 .. 255 ).random().toString())
219+ put(" MALLOC_PERTURB_" , perturbByte.toString())
220+ // Logged so a glibc-detected corruption abort can be reproduced with the
221+ // same perturb byte (the value is otherwise random per run).
222+ project.logger.lifecycle(" [$configName ] MALLOC_PERTURB_=$perturbByte " )
219223 }
220224 putAll(testEnv)
221225 put(" DDPROF_TEST_DISABLE_RATE_LIMIT" , " 1" )
Original file line number Diff line number Diff line change @@ -160,6 +160,9 @@ case $ALLOCATOR in
160160 # malloc, not the LD_PRELOAD-replaced allocators below.
161161 export MALLOC_CHECK_=3
162162 export MALLOC_PERTURB_=$(( RANDOM % 255 + 1 ))
163+ # Logged so a glibc-detected corruption abort can be reproduced with the
164+ # same perturb byte (the value is otherwise random per run).
165+ echo " MALLOC_PERTURB_=${MALLOC_PERTURB_} "
163166 # thread-churn/dump-storm/vthread-context-cascade cycle many short-lived
164167 # threads; glibc's per-thread arenas are slow to trim back to the OS,
165168 # which was inflating container RSS past the OOM limit on aarch64
You can’t perform that action at this time.
0 commit comments