Skip to content

Commit 0b03bba

Browse files
committed
Exclude J9 from MALLOC_CHECK_ default test env
J9 hits a pre-existing, unrelated glibc heap-corruption bug that MALLOC_CHECK_ now surfaces as a hard abort; gate it off until that's investigated separately.
1 parent 99699e0 commit 0b03bba

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

build-logic/conventions/src/main/kotlin/com/datadoghq/profiler/ProfilerTestPlugin.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,14 @@ class ProfilerTestPlugin : Plugin<Project> {
208208
// Turn silent glibc heap corruption (e.g. a use-after-free write into a
209209
// freed chunk) into an immediate, attributable SIGABRT instead of a crash
210210
// much later in an unrelated allocation. Only meaningful against glibc's
211-
// own malloc: skip on musl (no MALLOC_CHECK_ support) and skip whenever a
212-
// sanitizer/allocator already replaces malloc via LD_PRELOAD.
211+
// own malloc: skip on musl (no MALLOC_CHECK_ support), skip whenever a
212+
// sanitizer/allocator already replaces malloc via LD_PRELOAD, and skip on
213+
// J9 (its own allocator usage trips a pre-existing, unrelated heap
214+
// corruption that needs separate investigation).
213215
if (PlatformUtils.currentPlatform == Platform.LINUX &&
214216
!PlatformUtils.isMusl() &&
215-
!testEnv.containsKey("LD_PRELOAD")
217+
!testEnv.containsKey("LD_PRELOAD") &&
218+
!PlatformUtils.isTestJvmJ9()
216219
) {
217220
put("MALLOC_CHECK_", "3")
218221
put("MALLOC_PERTURB_", (1..255).random().toString())

0 commit comments

Comments
 (0)