Skip to content
Snippets Groups Projects
Commit f2ec5388 authored by stepan's avatar stepan
Browse files

Fix potential race in TruffleNFI_Context

parent 4abd46c4
No related branches found
No related tags found
No related merge requests found
......@@ -369,13 +369,13 @@ final class TruffleNFI_Context extends RFFIContext {
UnsafeAdapter.UNSAFE.freeMemory(ptr);
}
transientAllocations.clear();
RuntimeException lastUpCallEx = getLastUpCallException();
setLastUpCallException(null);
if (hasAccessLock) {
releaseLock();
}
RuntimeException lastUpCallEx = getLastUpCallException();
if (lastUpCallEx != null) {
CompilerDirectives.transferToInterpreter();
setLastUpCallException(null);
throw lastUpCallEx;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment