RFR: 8295344: Harden runtime/StackGuardPages/TestStackGuardPages.java
Johan Sjölen
jsjolen at openjdk.org
Thu Feb 2 12:42:13 UTC 2023
There are multiple ways which the stack guard pages tests can be hardened:
- Rewritten the Java part of the test using ProcessTools.executeProcess(ProcessBuilder pb) which will make stdout/stderr be consistently logged and debugging much easier.
- Split up initial/other thread into 2 tests
- Split up Java thread tests and native thread tests into two separate files
- Check more error conditions in the C code
- Instead of recursing and creating stack frames, just `alloca()` and poke until we hit a `SIGSEGV`.
The goal is that this will help us out with [JDK-8293452](https://bugs.openjdk.org/browse/JDK-8293452).
-------------
Commit messages:
- Refer to method instead of hard coded printAlive in exeinvoke
- Separate into two tests
- Rename, document variables
- Add _y to peek at allocated space
- Allocate 128 bytes
- Only init thread when absolutely necessary
- Check explicitly
- Split up test
Changes: https://git.openjdk.org/jdk/pull/12386/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12386&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8295344
Stats: 151 lines in 3 files changed: 96 ins; 29 del; 26 mod
Patch: https://git.openjdk.org/jdk/pull/12386.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12386/head:pull/12386
PR: https://git.openjdk.org/jdk/pull/12386
More information about the hotspot-runtime-dev
mailing list