Metaspace uses custom allocators which use mmap/munmap to acquire memory. ASan by default is unaware of this memory and as such performs no checking of its accesses.
ASan supports user-specified poisoning/unpoisoning. This allows ASan to detect unexpected usage of memory, effectively allowing us to detect use-after-free in the Arena.
This enhancement will instrument Metaspace for ASan using poisoning/unpoisoning.
AdditionallyJDK-8298445 will be able to make use of poisoning/unpoisoning information by not looking for pointers in poisoned memory. This makes it much more accurate and determenistic.
ASan supports user-specified poisoning/unpoisoning. This allows ASan to detect unexpected usage of memory, effectively allowing us to detect use-after-free in the Arena.
This enhancement will instrument Metaspace for ASan using poisoning/unpoisoning.
Additionally