-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
_PyPegen_raise_error_known_location() uses wrong build format #95876
Comments
tiran
added
type-bug
An unexpected behavior, bug, or error
3.11
only security fixes
3.12
bugs and security fixes
labels
Aug 11, 2022
tiran
added a commit
to tiran/cpython
that referenced
this issue
Aug 11, 2022
pablogsal
pushed a commit
that referenced
this issue
Aug 11, 2022
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Aug 11, 2022
…nGH-95877) (cherry picked from commit b4c857d) Co-authored-by: Christian Heimes <christian@python.org>
miss-islington
added a commit
that referenced
this issue
Aug 11, 2022
tiran
added a commit
to tiran/cpython
that referenced
this issue
Aug 11, 2022
…pythonGH-95877). (cherry picked from commit b4c857d) Co-authored-by: Christian Heimes <christian@python.org>
miss-islington
pushed a commit
that referenced
this issue
Aug 11, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
_PyPegen_raise_error_known_location()
usesPy_BuildValue()
to generate a tuple for SyntaxError. The format string uses wrong values for all integer constants. lineno, col_number, end_lineno, and end_col_number are Py_ssize_t. Thei
format string handles int. This causes memory corruption on 64bit operation systems with strict ABI (e.g. wasm64).cpython/Parser/pegen_errors.c
Lines 373 to 376 in b9e956f
I can reliable crash the interpreter with a syntax error like
1+=1
. Notice the<ensc object at 0x1>
in the object dump.The fix is trivial, use
n
instead ofi
. https://docs.python.org/3/c-api/arg.html#c.Py_BuildValueYour environment
CPython main
wasm64-emscripten (EMSDK 3.1.18) with Node 16
The text was updated successfully, but these errors were encountered: