RFR: 8282952: Thread::exit should be immune to Thread.stop [v2]

David Holmes dholmes at openjdk.java.net
Tue Mar 22 02:38:13 UTC 2022


> To allow Thread::exit to be immune from asynchronous exceptions causing corruption of state we introduce a simple async exception delivery deferral mechanism. Note that we still allow async exceptions to become the "pending async exception" so they are not lost (potentially desirable in other usecases), but we defer the delivery of that exception i.e when it is moved from being the "pending async exception" to being the "current pending exception" (which is the exception actually in the process of being propagated).
> 
> Testing:
>  - runtime/Thread/StopAtExit.java combined with logging and debugging hooks to show that exceptions were being deferred
>  - tiers 1-3
> 
> Thanks,
> David

David Holmes has updated the pull request incrementally with one additional commit since the last revision:

  Improved comment - @dcubed feedback

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7886/files
  - new: https://git.openjdk.java.net/jdk/pull/7886/files/dd089f18..02b09477

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7886&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7886&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7886.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7886/head:pull/7886

PR: https://git.openjdk.java.net/jdk/pull/7886


More information about the hotspot-runtime-dev mailing list