Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: UnsupportedSpecializationException with MappingProxyType

Open Beginner friendly
#1,102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by reproducing the minimal MappingProxyType snippet from the issue, then inspect the mappingproxy implementation identified by MappingproxyBuiltinsFactory.GetNodeFactory in the stack trace. Confirm that the call no longer raises UnsupportedSpecializationException and add a regression test covering the snippet.

Written by the indexing model from the issue text.

Description

bug
Describe the bug

GraalPy crashes when running this fuzzed code:

from types import MappingProxyType
MappingProxyType.get(None, None)
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 MappingproxyBuiltinsFactory.GetNodeFactory.GetNodeGen@143c64bb: [None, None, NoValue], [PNone,PNone,PNone]
com.oracle.truffle.api.dsl.UnsupportedSpecializationException: Unexpected values provided for MappingproxyBuiltinsFactory.GetNodeFactory.GetNodeGen@143c64bb: [None, None, NoValue], [PNone,PNone,PNone]
	at org.graalvm.py/com.oracle.graal.python.builtins.objects.mappingproxy.MappingproxyBuiltinsFactory$GetNodeFactory$GetNodeGen.executeAndSpecialize(MappingproxyBuiltinsFactory.java:1061)
	at org.graalvm.py/com.oracle.graal.python.builtins.objects.mappingproxy.MappingproxyBuiltinsFactory$GetNodeFactory$GetNodeGen.execute(MappingproxyBuiltinsFactory.java:1032)
	at org.graalvm.py/com.oracle.graal.python.nodes.function.builtins.BuiltinCallNode$BuiltinAnyCallNode.execute(BuiltinCallNode.java:64)
	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

Dominant language
Python
Stars
1.6k
Forks
155
Avg merge
8h 58m
Merged PRs (30d)
39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oracle/graalpython

All issues in oracle/graalpython

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.