Skip to content

Commit b3ae653

Browse files
committed
Fix: closed handle must have invalid ID
1 parent 7c04110 commit b3ae653

File tree

1 file changed

+1
-0
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy

1 file changed

+1
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyHandle.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ public void close(GraalHPyContext hpyContext) {
183183
if (isPointer()) {
184184
try {
185185
hpyContext.releaseHPyHandleForObject((int) asPointer());
186+
id = -1;
186187
} catch (UnsupportedMessageException e) {
187188
CompilerDirectives.transferToInterpreterAndInvalidate();
188189
throw new IllegalStateException("trying to release non-native handle that claims to be native");

0 commit comments

Comments
 (0)