RFR: 8276227: ciReplay: SIGSEGV if classfile for replay compilation is not present after JDK-8275868 [v2]
Christian Hagedorn
chagedorn at openjdk.java.net
Tue Nov 2 10:32:46 UTC 2021
> The fix for [JDK-8275868](https://bugs.openjdk.java.net/browse/JDK-8275868) does not handle the case when the classfile for the method to be replay compiled is not present. This will fail to load the klass. Afterwards, we are trying to access the protection domain of the failed to load klass (i.e. a null pointer) which results in a segmentation fault. The fix is straight forward to only set the new protection domain if the klass was loaded successfully. I additionally changed the code such that we are only trying to set the protection domain when reading the first `instanceKlass` entry. This avoids some potential problems with older replay files where we do not have this additional first entry set by JDK-8275868.
>
> Thanks,
> Christian
Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
add test
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/6189/files
- new: https://git.openjdk.java.net/jdk/pull/6189/files/4fe95743..1e608b85
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6189&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6189&range=00-01
Stats: 73 lines in 1 file changed: 73 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/6189.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6189/head:pull/6189
PR: https://git.openjdk.java.net/jdk/pull/6189
More information about the hotspot-compiler-dev
mailing list