Details
-
Bug
-
Resolution: Fixed
-
P4
-
21, 22, 23
-
b16
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8330958 | 21.0.4 | Sonia Zaldana Calles | P4 | Resolved | Fixed | b01 |
Description
We have multiple issues that cause the ASAN build in fastdebug to not work, or to fail gtests.
1) When adding ASAN support for metaspace, we decided to track poisoning not at the OS border (map) but at the border between metaspace and outer JVM code. More precisely, at the border of ChunkManager chunk allocation/deallocation. Chunks handed out by the chunk manager are unpoisoned and poisoned when handed back.
This causes some problems since within metaspace, we access memory that is committed but not yet handed to the user (for zapping or for verification in debug builds). So, from the ASANs' view, those accesses are invalid, whereas for Metaspace, those accesses are perfectly valid.
In these cases, we need to unpoison the memory or exclude the code section, if possible, for ASAN builds. This affects both JVM code and gtests.
2) NMT gtests sometimes do dangerous things deliberately (accessing invalid memory to track error recognition), and these tests should be disabled with ASAN
1) When adding ASAN support for metaspace, we decided to track poisoning not at the OS border (map) but at the border between metaspace and outer JVM code. More precisely, at the border of ChunkManager chunk allocation/deallocation. Chunks handed out by the chunk manager are unpoisoned and poisoned when handed back.
This causes some problems since within metaspace, we access memory that is committed but not yet handed to the user (for zapping or for verification in debug builds). So, from the ASANs' view, those accesses are invalid, whereas for Metaspace, those accesses are perfectly valid.
In these cases, we need to unpoison the memory or exclude the code section, if possible, for ASAN builds. This affects both JVM code and gtests.
2) NMT gtests sometimes do dangerous things deliberately (accessing invalid memory to track error recognition), and these tests should be disabled with ASAN
Attachments
Issue Links
- backported by
-
JDK-8330958 Multiple ASAN errors reported for metaspace
- Resolved