https://github.com/python/cpython/commit/8d215929f4327ea0e5f63c62c51c8d2892b82d18
commit: 8d215929f4327ea0e5f63c62c51c8d2892b82d18
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-07-06T15:22:23Z
summary:

[3.15] gh-148286: Remove invalid test in `test_decodeescape` (GH-153187) 
(#153204)

(cherry picked from commit 8477652cc122e744bcc70c1e133905bcbe2d8516)

Co-authored-by: Stan Ulbrych <[email protected]>

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 410ebab729c2cf4..c591e986bbce35f 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 a00e256b3336182..e3679bc421f4205 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