GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-101178: Fix UB in `binascii.b2a_ascii85` by StanFromIreland · Pull Request #148166 · python/cpython

Conversation

@StanFromIreland

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Spotted when running the test:

$ ./python -m test test_binascii
Using random seed: 2254522381
0:00:00 load avg: 0.43 Run 1 test sequentially in a single process
0:00:00 load avg: 0.43 [1/1] test_binascii
Modules/binascii.c:1243:42: runtime error: left shift of 129 by 24 places cannot be represented in type 'int'
Modules/binascii.c:1484:42: runtime error: left shift of 130 by 24 places cannot be represented in type 'int'
0:00:00 load avg: 0.43 [1/1] test_binascii passed

== Tests result: SUCCESS ==

1 test OK.

Total duration: 89 ms
Total tests: run=197 skipped=17
Total test files: run=1/1
Result: SUCCESS
  • Issue: base64.b85encode uses significant amount of RAM #101178

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@StanFromIreland
Fix UB in binascii.b2a_ascii85
4d6b89a
@StanFromIreland
StanFromIreland requested a review from serhiy-storchaka April 6, 2026 13:52
@StanFromIreland StanFromIreland added the skip news label Apr 6, 2026
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 6, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 6, 2026
base64.b85encode uses significant amount of RAM #101178
Closed
@StanFromIreland StanFromIreland mentioned this pull request Apr 6, 2026
gh-148286: Fail on new UB in CI #148168
Merged
serhiy-storchaka
serhiy-storchaka approved these changes Apr 7, 2026
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Good catch. LGTM. 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 7, 2026
@StanFromIreland
StanFromIreland merged commit 63d3c49 into python:main Apr 7, 2026
59 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland
StanFromIreland deleted the binascii.b2a_ascii85 branch April 7, 2026 07:44
@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 7, 2026
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@StanFromIreland @ljfp
pythongh-101178: Fix UB in binascii.b2a_ascii85 (python#148166)
20ec1a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@StanFromIreland @serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.