[Bug]: UnsupportedSpecializationException with tuple
まだ誰も着手していません。
評価
調査の方向性
提供された uname_result.index(0, '') スニペットでクラッシュを再現し、次に TupleBuiltins.java の IndexNode 周辺と、スタックトレースに示されている GetTupleStorageNode エントリを調査します。この呼び出しで UnsupportedSpecializationException が発生しなくなり、リグレッションテストが再現ケースをカバーすれば作業完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
GraalPy crashes when running this fuzzed code:
from platform import uname_result
uname_result.index(0, '')
Operating system
Linux
CPU architecture
x86_64
GraalPy version
GraalPy 3.13.14 (Oracle GraalVM Native 25.3.4.1)
JDK version
No response
Context configuration
No response
Steps to reproduce
Snippet listed above
Expected behavior
No crash
Stack trace
Unexpected values provided for TupleNodesFactory.GetTupleStorageNodeGen.Inlined@3fff4484: [TupleBuiltinsFactory.IndexNodeFactory.IndexNodeGen@6b2b70a1, 0], [IndexNodeGen,Integer]
com.oracle.truffle.api.dsl.UnsupportedSpecializationException: Unexpected values provided for TupleNodesFactory.GetTupleStorageNodeGen.Inlined@3fff4484: [TupleBuiltinsFactory.IndexNodeFactory.IndexNodeGen@6b2b70a1, 0], [IndexNodeGen,Integer]
at org.graalvm.py/com.oracle.graal.python.nodes.builtins.TupleNodesFactory$GetTupleStorageNodeGen.newUnsupportedSpecializationException2(TupleNodesFactory.java:492)
at org.graalvm.py/com.oracle.graal.python.nodes.builtins.TupleNodesFactory$GetTupleStorageNodeGen$Inlined.executeAndSpecialize(TupleNodesFactory.java:556)
at org.graalvm.py/com.oracle.graal.python.nodes.builtins.TupleNodesFactory$GetTupleStorageNodeGen$Inlined.execute(TupleNodesFactory.java:539)
at org.graalvm.py/com.oracle.graal.python.builtins.objects.tuple.TupleBuiltins$IndexNode.index(TupleBuiltins.java:178)
at org.graalvm.py/com.oracle.graal.python.builtins.objects.tuple.TupleBuiltinsFactory$IndexNodeFactory$IndexNodeGen.executeWithoutClinic(TupleBuiltinsFactory.java:459)
at org.graalvm.py/com.oracle.graal.python.nodes.function.builtins.PythonQuaternaryClinicBuiltinNode.execute(PythonQuaternaryClinicBuiltinNode.java:104)
at org.graalvm.py/com.oracle.graal.python.nodes.function.builtins.BuiltinCallNode$BuiltinQuaternaryCallNode.execute(BuiltinCallNode.java:156)
at org.graalvm.py/com.oracle.graal.python.nodes.function.BuiltinFunctionRootNode.execute(BuiltinFunctionRootNode.java:337)
at org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:808)
at org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:722)
at org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:641)
at org.graalvm.truffle.runtime.svm/com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:124)
at com.oracle.truffle.enterprise.svm/com.oracle.svm.enterprise.truffle.compiler.SubstrateEnterpriseOptimizedCallTarget.invokeCompiledAdapterOrCallBoundary(SubstrateEnterpriseOptimizedCallTarget.java:293)
at com.oracle.truffle.enterprise.svm/com.oracle.svm.enterprise.truffle.compiler.SubstrateEnterpriseOptimizedCallTarget.invokeFromInterpreter(SubstrateEnterpriseOptimizedCallTarget.java:269)
at com.oracle.truffle.enterprise.svm/com.oracle.svm.enterprise.truffle.compiler.SubstrateEnterpriseOptimizedCallTarget.doInvoke(SubstrateEnterpriseOptimizedCallTarget.java:255)
at org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:573)
at org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:519)
at org.graalvm.truffle/com.oracle.truffle.api.nodes.IndirectCallNode$1.call(IndirectCallNode.java:96)
at org.graalvm.py/com.oracle.graal.python.nodes.call.CallDispatchers$SimpleIndirectInvokeNode.doIndirect(CallDispatchers.java:167)
at org.graalvm.py/com.oracle.graal.python.nodes.call.CallDispatchersFactory$SimpleIndirectInvokeNodeGen$Uncached.execute(CallDispatchersFactory.java:307)
at org.graalvm.py/com.oracle.graal.python.nodes.call.CallDispatchers$BuiltinFunctionCachedCallNode.callBuiltinFunctionMegamorphic(CallDispatchers.java:265)
at org.graalvm.py/com.oracle.graal.python.nodes.call.CallDispatchersFactory$BuiltinFunctionCachedCallNodeGen$Uncached.execute(CallDispatchersFactory.java:1173)
at org.graalvm.py/com.oracle.graal.python.nodes.call.CallNode.builtinFunctionCall(CallNode.java:152)
at org.graalvm.py/com.oracle.graal.python.nodes.call.CallNodeGen$Uncached.executeInternal(CallNodeGen.java:619)
at org.graalvm.py/com.oracle.graal.python.nodes.call.CallNode.execute(CallNode.java:128)
at org.graalvm.py/com.oracle.graal.python.nodes.call.special.CallTernaryMethodNode.call(CallTernaryMethodNode.java:176)
at org.graalvm.py/com.oracle.graal.python.nodes.bytecode_dsl.PBytecodeDSLRootNodeGen$CallTernaryMethod_Node.execute$uncached(PBytecodeDSLRootNodeGen.java)
at org.graalvm.py/com.oracle.graal.python.nodes.bytecode_dsl.PBytecodeDSLRootNodeGen$UncachedBytecodeNodeTailCall.handleCallTernaryMethod_(PBytecodeDSLRootNodeGen.java:37882)
at org.graalvm.py/com.oracle.graal.python.nodes.bytecode_dsl.PBytecodeDSLRootNodeGen$UncachedBytecodeNodeTailCall.__stub_handleCallTernaryMethod_(PBytecodeDSLRootNodeGen.java:0)
at org.graalvm.py/com.oracle.graal.python.nodes.bytecode_dsl.PBytecodeDSLRootNodeGen$UncachedBytecodeNodeTailCall.continueAt(PBytecodeDSLRootNodeGen.java:35093)
at org.graalvm.py/com.oracle.graal.python.nodes.bytecode_dsl.PBytecodeDSLRootNodeGen.continueAt(PBytecodeDSLRootNodeGen.java:3501)
at org.graalvm.py/com.oracle.graal.python.nodes.bytecode_dsl.PBytecodeDSLRootNodeGen.execute(PBytecodeDSLRootNodeGen.java:3493)
[...snip...]
Additional context
No response
- 主要言語
- Python
- スター
- 1.6k
- フォーク
- 155
- 平均マージ
- 8時間 20分
- マージ済み PR(30日)
- 43
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oracle/graalpython のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
oracle/graalpython#1105 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
oracle/graalpython#1102 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
oracle/graalpython#1133 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
oracle/graalpython#1112 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
oracle/graalpython#1110 · コメント 1 件 ·
oracle/graalpython の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
huggingface/Repo2RLEnv#163 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NousResearch/hermes-agent#121143 ·