RFR: 8365385: [asan] os::pretouch_memory() is not compatible with ASAN

Afshin Zafari azafari at openjdk.org
Fri Sep 12 08:03:39 UTC 2025


When ASAN is enabled, memories allocated from ChunkManager are poisoned/unpoisoned. These un-/poisoning are done in ctor/dtor of VirtualSpaceNode and whenever chunks come/leave the ChunkManager list. Since chunks can be merged or split the poisoning should also follow the new memory segments correspondingly. To have a more precise control over where/when do the un-/poisoning, the ASAN poisoning/unpoisoning memory regions is moved after os::uncommit/commit operations.

Tested on tiers1-5

-------------

Commit messages:
 - 8365385: [asan] os::pretouch_memory() is not compatible with ASAN

Changes: https://git.openjdk.org/jdk/pull/27248/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27248&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8365385
  Stats: 22 lines in 2 files changed: 4 ins; 18 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/27248.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27248/head:pull/27248

PR: https://git.openjdk.org/jdk/pull/27248


More information about the hotspot-runtime-dev mailing list