RFR: 8364004: Expose VMError::controlledCrash via Whitebox
Kim Barrett
kbarrett at openjdk.org
Mon Jul 28 06:33:54 UTC 2025
On Fri, 25 Jul 2025 07:34:49 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Small addition to the circle of WhiteBox functions to allow more controlled crashes triggered from jtreg tests.
Changes requested by kbarrett (Reviewer).
src/hotspot/share/prims/whitebox.cpp line 2734:
> 2732: WB_ENTRY(void, WB_ControlledCrash(JNIEnv* env, jobject o, jint how))
> 2733: #ifdef ASSERT
> 2734: DEBUG_ONLY(VMError::controlled_crash(how);)
`DEBUG_ONLY` wrapping isn't needed here, since we're in `#ifdef ASSERT` context.
test/lib/jdk/test/whitebox/WhiteBox.java line 564:
> 562:
> 563: // Force a controlled crash (debug builds only)
> 564: public native void controlledCrash(int how);
Please put this somewhere other than in the middle of GC & reference processing related functions.
-------------
PR Review: https://git.openjdk.org/jdk/pull/26472#pullrequestreview-3060602512
PR Review Comment: https://git.openjdk.org/jdk/pull/26472#discussion_r2234846750
PR Review Comment: https://git.openjdk.org/jdk/pull/26472#discussion_r2234855579
More information about the hotspot-dev
mailing list