RFR: JDK-8257828: SafeFetch may crash if invoked in non-JavaThreads
Kim Barrett
kbarrett at openjdk.java.net
Wed Dec 9 14:07:35 UTC 2020
On Tue, 8 Dec 2020 13:35:24 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> if (info != NULL && uc != NULL && thread != NULL) {
So the cause of the problem is the `thread != NULL` in that test. And just
removing all of those would fix the problem.
But I agree that eliminating all the (near) copied variants and merging this
functionality into signals_posix is good.
> This is unfortunate since SafeFetch is used [...]
Another place this hits is OopStorage, which uses SafeFetchN in two places.
Correct code shouldn't have a problem with one of them because the access
won't be invalid (if code is correct). But the other could be a problem,
though I think not seen in practice.
Might there be any similar problem on Windows?
This might be kind of related?
https://bugs.openjdk.java.net/browse/JDK-8185734
-------------
Marked as reviewed by kbarrett (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1695
More information about the hotspot-runtime-dev
mailing list