Skip to content

gh-153981: Fix use after free bug itertools.count()#153983

Open
johng wants to merge 2 commits into
python:mainfrom
johng:use-after-free-iter-tools
Open

gh-153981: Fix use after free bug itertools.count()#153983
johng wants to merge 2 commits into
python:mainfrom
johng:use-after-free-iter-tools

Conversation

@johng

@johng johng commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Obtain a reference to lz->long_cnt, lz->long_step
such that we don't hit a use after free.

@johng
johng requested a review from rhettinger as a code owner July 18, 2026 14:39
@johng johng changed the title gr-153981 Fix use after free bug itertools.count() gr-153981: Fix use after free bug itertools.count() Jul 18, 2026
@johng
johng force-pushed the use-after-free-iter-tools branch from 8623456 to 765d7d5 Compare July 18, 2026 14:40
Obtain a reference to lz->long_cnt, lz->long_step
such that we don't hit a use after free
@johng
johng force-pushed the use-after-free-iter-tools branch from 765d7d5 to 8580b6a Compare July 18, 2026 14:42
@johng johng changed the title gr-153981: Fix use after free bug itertools.count() gh-153981: Fix use after free bug itertools.count() Jul 18, 2026
@johng

johng commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

This appears to add some very slight overhead to repr in slow mode, no impact to the likely more heavily used fast mode

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.

1 participant