GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [Bug]: `itertools.groupby` group iterator re-entered from the key's `__eq__` returns a Java `null`, which crashes with `NullPointerException` · Issue #1276 · oracle/graalpython Open DescriptionDescribe the bugWhen the key's Operating systemmacOS CPU architectureARM64 GraalPy version25.4.4.1.1 (Python 3.13.14), community build from the GitHub release. The code involved is unchanged on master d0565ae. JDK versionNo response Context configurationNo response Steps to reproducefrom itertools import groupby class K: def __init__(self, v): pass def __eq__(self, other): global i i += 1 if i == 1: next(g, None) # advance the same group iterator from inside __eq__ return True i = 0 g = next(groupby(range(10), K))[1] print(repr(next(g, None))) print(repr(next(g, None))) print("done") GraalPy prints Expected behaviorCPython 3.13.18 (same on 3.12.16): Stack tracejava.lang.NullPointerException: Null receiver values are not supported by libraries. at org.graalvm.truffle/com.oracle.truffle.api.library.LibraryFactory.dispatch(LibraryFactory.java:550) at org.graalvm.truffle/com.oracle.truffle.api.library.LibraryFactory.create(LibraryFactory.java:302) at org.graalvm.py/com.oracle.graal.python.nodes.object.GetForeignObjectClassNodeGen.executeAndSpecialize(GetForeignObjectClassNodeGen.java:143) at org.graalvm.py/com.oracle.graal.python.nodes.object.GetForeignObjectClassNodeGen.execute(GetForeignObjectClassNodeGen.java:96) at org.graalvm.py/com.oracle.graal.python.nodes.object.GetRegisteredClassNode.noRegisteredClass(GetRegisteredClassNode.java:95) at org.graalvm.py/com.oracle.graal.python.nodes.object.GetRegisteredClassNodeGen.executeAndSpecialize(GetRegisteredClassNodeGen.java:183) at org.graalvm.py/com.oracle.graal.python.nodes.object.GetRegisteredClassNodeGen.execute(GetRegisteredClassNodeGen.java:157) at org.graalvm.py/com.oracle.graal.python.nodes.object.GetClassNode.getForeign(GetClassNode.java:200) at org.graalvm.py/com.oracle.graal.python.nodes.object.GetClassNodeGen$Inlined.executeAndSpecialize(GetClassNodeGen.java:476) at org.graalvm.py/com.oracle.graal.python.nodes.object.GetClassNodeGen$Inlined.execute(GetClassNodeGen.java:393) at org.graalvm.py/com.oracle.graal.python.builtins.objects.type.TpSlots$GetObjectSlotsNode.doIt(TpSlots.java:2085) at org.graalvm.py/com.oracle.graal.python.builtins.objects.type.TpSlotsFactory$GetObjectSlotsNodeGen$Inlined.execute(TpSlotsFactory.java:342) at org.graalvm.py/com.oracle.graal.python.lib.PyObjectReprAsObjectNode.repr(PyObjectReprAsObjectNode.java:105) at org.graalvm.py/com.oracle.graal.python.lib.PyObjectReprAsObjectNodeGen$Inlined.execute(PyObjectReprAsObjectNodeGen.java:329) at org.graalvm.py/com.oracle.graal.python.builtins.modules.BuiltinFunctions$ReprNode.repr(BuiltinFunctions.java:1711) at org.graalvm.py/com.oracle.graal.python.builtins.modules.BuiltinFunctionsFactory$ReprNodeFactory$ReprNodeGen.execute(BuiltinFunctionsFactory.java:7030) Additional contextAssigning the result instead (
Root Cause
Fix SuggestionIn ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |