Skip to content

Commit 36e952e

Browse files
fangererqunaibit
authored andcommitted
Add assertion
1 parent 1f10eab commit 36e952e

File tree

1 file changed

+2
-0
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/transitions

1 file changed

+2
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/transitions/CApiTransitions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ public static void pollReferenceQueue() {
479479
* ID which could resolve to another object.
480480
*/
481481
CStructAccess.WriteIntNode.writeUncached(stubPointer, CFields.GraalPyObject__handle_table_index, 0);
482+
// this can only happen if the object is a GC object
483+
assert reference.gc;
482484
/*
483485
* Since the managed object is already dead (only the native
484486
* object stub is still alive), we need to remove the object

0 commit comments

Comments
 (0)