Skip to content

BUG: add bounds-checking to in-place string multiply #29074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025

Conversation

charris
Copy link
Member

@charris charris commented May 27, 2025

Backport of #29060.

Fixes #29011.

Re-do of #29056 without any backwards-incompatible changes.

Adds bounds-checking to the string multiply core, since in-place multiply via *= can bypass the code that constructs output buffers in np.strings.multiply.

  • BUG: add bounds-checking to in-place string multiply

  • MNT: check for overflow and raise OverflowError

  • MNT: respond to review suggestion

  • MNT: handle overflow in one more spot

  • MNT: make test behave the same on all architectures

  • MNT: reorder to avoid work in some cases

* BUG: add bounds-checking to in-place string multiply

* MNT: check for overflow and raise OverflowError

* MNT: respond to review suggestion

* MNT: handle overflow in one more spot

* MNT: make test behave the same on all architectures

* MNT: reorder to avoid work in some cases
@charris charris added this to the 2.3.0 release milestone May 27, 2025
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels May 27, 2025
@charris charris merged commit 274f1b9 into numpy:maintenance/2.3.x May 27, 2025
73 checks passed
@charris charris deleted the backport-29060 branch May 27, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy