The JIT's understanding of ** is wrong
#127809
Labels
3.14
new features, bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-JIT
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
**is weird in that the type of the result depends on the values of the inputs. The logic forint/floatpower is:However, our optimizer wrongly assumes:
This means that tons of different poorly-chosen values can cause JIT code to crash:
Normally we could just ignore the problem and produce an unknown type during abstract interpretation, but a
**containing at least one constant value is actually reasonably common (thinkx ** 2,2 ** n, ors ** 0.5).We should probably teach the optimizer how to handle these properly.
Linked PRs
**#127844The text was updated successfully, but these errors were encountered: