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 @@ -313,12 +313,21 @@ class ProfilerTestPlugin : Plugin<Project> {
313313
314314 // Sanitizer conditions
315315 when (testConfig.configName) {
316- " asan" -> testTask.onlyIf {
317- PlatformUtils .locateLibasan() != null &&
318- // Skip J9+ASAN: OpenJ9 has known GC stack-scanning and defineClass
319- // race bugs exposed by ASAN timing
320- // https://github.com/eclipse-openj9/openj9/issues/23514
321- ! PlatformUtils .isTestJvmJ9()
316+ " asan" -> {
317+ testTask.onlyIf {
318+ PlatformUtils .locateLibasan() != null &&
319+ // Skip J9+ASAN: OpenJ9 has known GC stack-scanning and defineClass
320+ // race bugs exposed by ASAN timing
321+ // https://github.com/eclipse-openj9/openj9/issues/23514
322+ ! PlatformUtils .isTestJvmJ9()
323+ }
324+ // The ASAN test JVM is pinned to -Xmx512m (see ConfigurationPresets.kt)
325+ // to keep the heap below ASan's shadow-memory region. Without forking,
326+ // Gradle reuses one JVM for the whole suite, and per-test allocations
327+ // (JFR recordings, JMC object models) accumulate until it OOMs late in
328+ // the run even though every individual test passes. Restart periodically
329+ // to bound cumulative heap growth.
330+ testTask.setForkEvery(25 )
322331 }
323332 // TSan + JVM integration tests are incompatible: the profiler's signal
324333 // handlers (SIGPROF at 1ms) are TSan-instrumented; when a signal fires
You can’t perform that action at this time.
0 commit comments