-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Not closing an f-string leads to a use-after-free #103718
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
Labels
type-crash
A hard crash of the interpreter, possibly with a core dump
Comments
lysnikolaou
added a commit
to lysnikolaou/cpython
that referenced
this issue
Apr 23, 2023
lysnikolaou
added a commit
to lysnikolaou/cpython
that referenced
this issue
Apr 23, 2023
lysnikolaou
added a commit
that referenced
this issue
Apr 23, 2023
Reopening this as is still not fixed:
|
lysnikolaou
added a commit
to lysnikolaou/cpython
that referenced
this issue
Apr 25, 2023
lysnikolaou
added a commit
that referenced
this issue
Apr 25, 2023
Turns out we always need to remember/restore fstring buffers in all of the stack of tokenizer modes, cause they might change to `TOK_REGULAR_MODE` and have newlines inside the braces (which is when we need to reallocate the buffer and restore the fstring ones).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Not closing an f-string in the REPL or a file leads to a use-after-free. This had to do with how f-string buffers are updated when in need of reallocating more space for the tokenizer buffer and it was introduced in 1ef61cf. Here's an example (this only fails with address sanitizer enabled):
Linked PRs
The text was updated successfully, but these errors were encountered: