FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-148286: Remove invalid test in `test_decodeescape` by StanFromIreland · Pull Request #153187 · python/cpython · GitHub

Repository navigation

gh-148286: Remove invalid test in test_decodeescape - #153187

Merged
StanFromIreland merged 4 commits into
python:mainfrom
StanFromIreland:PyBytes_DecodeEscape-ub
Jul 6, 2026
Merged

StanFromIreland merged 4 commits into
python:mainfrom
StanFromIreland:PyBytes_DecodeEscape-ub

Conversation

StanFromIreland commented Jul 6, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

This is technically disallowed by the documentation of PyBytes_DecodeEscape (added in 37e2762), which says:

s must not be NULL

However, this was triggered by our test suite, which explicitly tests this case:

self.assertEqual(decodeescape(NULL), b'')

Should we also update the documentation? CC @ZeroIntensity (added docs) and @serhiy-storchaka (added test)

Copy link
Copy Markdown
Member

Simply comment out the test.

StanFromIreland marked this pull request as ready for review July 6, 2026 12:09
StanFromIreland changed the title gh-148286: Fix UB (applying zero offset to null pointer) in PyBytes_DecodeEscape gh-148286: Remove invalid test in test_decodeescape Jul 6, 2026

serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. 👍

StanFromIreland added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Jul 6, 2026
StanFromIreland merged commit 8477652 into python:main Jul 6, 2026
58 checks passed
StanFromIreland deleted the PyBytes_DecodeEscape-ub branch July 6, 2026 14:47

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 8477652cc122e744bcc70c1e133905bcbe2d8516 3.14

bedevere-app Bot commented Jul 6, 2026

Copy link
Copy Markdown

GH-153204 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Jul 6, 2026

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 8477652cc122e744bcc70c1e133905bcbe2d8516 3.13

StanFromIreland removed the needs backport to 3.13 only security fixes label Jul 6, 2026
StanFromIreland removed the needs backport to 3.14 bugs and security fixes label Jul 6, 2026
StanFromIreland added a commit that referenced this pull request Jul 6, 2026
…) (#153204)

(cherry picked from commit 8477652)

Co-authored-by: Stan Ulbrych <stan@python.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL