https://github.com/python/cpython/commit/8477652cc122e744bcc70c1e133905bcbe2d8516
commit: 8477652cc122e744bcc70c1e133905bcbe2d8516
branch: main
author: Stan Ulbrych <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-07-06T16:47:55+02:00
summary:

gh-148286: Remove invalid test in `test_decodeescape` (#153187)

files:
M Lib/test/test_capi/test_bytes.py
M Tools/ubsan/suppressions.txt

diff --git a/Lib/test/test_capi/test_bytes.py b/Lib/test/test_capi/test_bytes.py
index 410ebab729c2cf..c591e986bbce35 100644
--- a/Lib/test/test_capi/test_bytes.py
+++ b/Lib/test/test_capi/test_bytes.py
@@ -222,10 +222,10 @@ def test_decodeescape(self):
         self.assertEqual(decodeescape(br'x\xa\xy', 'replace'), b'x??y')
         self.assertEqual(decodeescape(br'x\xa\xy', 'ignore'), b'xy')
         self.assertRaises(ValueError, decodeescape, b'\\', 'spam')
-        self.assertEqual(decodeescape(NULL), b'')
         self.assertRaises(OverflowError, decodeescape, b'abc', NULL, 
PY_SSIZE_T_MAX)
         self.assertRaises(OverflowError, decodeescape, NULL, NULL, 
PY_SSIZE_T_MAX)
 
+        # INVALID decodeescape(NULL)
         # CRASHES decodeescape(b'abc', NULL, -1)
         # CRASHES decodeescape(NULL, NULL, 1)
 
diff --git a/Tools/ubsan/suppressions.txt b/Tools/ubsan/suppressions.txt
index a00e256b333618..e3679bc421f420 100644
--- a/Tools/ubsan/suppressions.txt
+++ b/Tools/ubsan/suppressions.txt
@@ -20,6 +20,3 @@ pointer-overflow:Modules/_zstd/decompressor.c
 
 # Modules/_io/stringio.c:350:24: runtime error: addition of unsigned offset to 
0x7fd01ec25850 overflowed to 0x7fd01ec2584c
 pointer-overflow:Modules/_io/stringio.c
-
-# Objects/bytesobject.c:1190:25: runtime error: applying zero offset to null 
pointer
-pointer-overflow:Objects/bytesobject.c

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to