Skip to content

[pull] main from python:main#762

Merged
pull[bot] merged 4 commits intotj-python:mainfrom
python:main
Feb 15, 2026
Merged

[pull] main from python:main#762
pull[bot] merged 4 commits intotj-python:mainfrom
python:main

Conversation

@pull
Copy link

@pull pull bot commented Feb 15, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )


📚 Documentation preview 📚: https://cpython-previews--762.org.readthedocs.build/

raminfp and others added 4 commits February 15, 2026 14:39
…er (#144788)

Guard against NULL pointer arithmetic in `_PyLexer_remember_fstring_buffers`
and `_PyLexer_restore_fstring_buffers`. When `start` or `multi_line_start`
are NULL (uninitialized in tok_mode_stack[0]), performing `NULL - tok->buf`
is undefined behavior. Add explicit NULL checks to store -1 as sentinel
and restore NULL accordingly.

Add test_lexer_buffer_realloc_with_null_start to test_repl.py that
exercises the code path where the lexer buffer is reallocated while
tok_mode_stack[0] has NULL start/multi_line_start pointers. This
triggers _PyLexer_remember_fstring_buffers and verifies the NULL
checks prevent undefined behavior.
@pull pull bot locked and limited conversation to collaborators Feb 15, 2026
@pull pull bot added the ⤵️ pull label Feb 15, 2026
@pull pull bot merged commit 23c488d into tj-python:main Feb 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants