From: Stan Ulbrych Date: Mon, 6 Jul 2026 14:47:55 +0000 (+0200) Subject: gh-148286: Remove invalid test in `test_decodeescape` (#153187) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8477652cc122e744bcc70c1e133905bcbe2d8516;p=thirdparty%2FPython%2Fcpython.git gh-148286: Remove invalid test in `test_decodeescape` (#153187) --- diff --git a/Lib/test/test_capi/test_bytes.py b/Lib/test/test_capi/test_bytes.py index 410ebab729c2..c591e986bbce 100644 --- a/Lib/test/test_capi/test_bytes.py +++ b/Lib/test/test_capi/test_bytes.py @@ -222,10 +222,10 @@ class CAPITest(unittest.TestCase): 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 a00e256b3336..e3679bc421f4 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