RFR: JDK-8305090: Some NMT tests broken when running under ASan
Justin King
jcking at openjdk.org
Tue Mar 28 15:18:00 UTC 2023
This change fixes or skips some NMT tests when running under ASan, as well as fixing a leak.
- `allocator_may_return_null=1` is added as the default is `0`, meaning ASan will never return `nullptr` and will instead crash. NMT tests check that large allocations return `nullptr` so those do not work under ASan currently.
- We skip tests that intentionally access memory outside the allocated range or do things that ASan will catch, causing the tests to fail.
- Fix a memory leak in `test_nmtpreinit.cpp`.
- Enable coredumps to work on some platforms with ASan, some other tests rely on this working.
All of this is related to ASan and NMT, so I opted to do it in a single change.
-------------
Commit messages:
- Fix NMT tests running under ASan
Changes: https://git.openjdk.org/jdk/pull/13208/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13208&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8305090
Stats: 30 lines in 5 files changed: 27 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/13208.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13208/head:pull/13208
PR: https://git.openjdk.org/jdk/pull/13208
More information about the build-dev
mailing list