summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-08-29 18:14:56 (GMT)
committerGitHub <noreply@github.com>2023-08-29 18:14:56 (GMT)
commit59e46932c8d2dc6fe84a8cf144dde962838c0204 (patch)
treef9d87d4f1f811d10dacb2011830a708a73a06273 /Lib/test
parent4f22152713d008cdd7c1d373a0f0c8dcf30e217e (diff)
downloadcpython-59e46932c8d2dc6fe84a8cf144dde962838c0204.zip
cpython-59e46932c8d2dc6fe84a8cf144dde962838c0204.tar.gz
cpython-59e46932c8d2dc6fe84a8cf144dde962838c0204.tar.bz2
gh-108488: Initialize JUMP_BACKWARD cache to 0, not 17 (#108591)
This mis-initialization caused the executor optimization to kick in sooner than intended. It also set the lower 4 bits of the counter to `1` -- those bits are supposed to be reserved (the actual counter is in the upper 12 bits).
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_capi/test_misc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py
index 1cd4c56..4148f15 100644
--- a/Lib/test/test_capi/test_misc.py
+++ b/Lib/test/test_capi/test_misc.py
@@ -2478,7 +2478,7 @@ class TestUops(unittest.TestCase):
opt = _testinternalcapi.get_uop_optimizer()
with temporary_optimizer(opt):
- testfunc([1, 2, 3])
+ testfunc(range(10))
ex = get_first_executor(testfunc)
self.assertIsNotNone(ex)
@@ -2493,7 +2493,7 @@ class TestUops(unittest.TestCase):
opt = _testinternalcapi.get_uop_optimizer()
with temporary_optimizer(opt):
- testfunc([1, 2, 3])
+ testfunc(range(10))
ex = get_first_executor(testfunc)
self.assertIsNotNone(ex)