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
parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py #81784
Comments
bpo-16806 introduced a regression with the following change: commit 995d9b9 (refs/bisect/bad)
get-pip.py does now crash: $ ./python get-pip.py --help
python: Parser/parsetok.c:266: parsetok: Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed.
Aborted (core dumped) Python 3.8 is also affected. get-pip.py comes from: https://bootstrap.pypa.io/get-pip.py Reproducing depends if REALLOC() returns a new pointer, see below. I attached get-pip2.py: simplified version which crash when using "./python get-pip2.py --help". If it doesn't crash, duplicate lines to make the file larger. -- The root issue seems to be that tok->multi_line_start isn't updated on REALLOC() in tok_nextc(): newbuf = (char *)PyMem_REALLOC(newbuf,
newsize);
if (newbuf == NULL) {
tok->done = E_NOMEM;
tok->cur = tok->inp;
return EOF;
}
tok->buf = newbuf;
tok->cur = tok->buf + cur;
tok->line_start = tok->cur; I guess that multi_line_start should also be updated there?
|
This is marked as release blocker but since BPO-37433 is still in review, I'm releasing 3.0b3 as is. Please resolve this by b4, I will block the last beta on this issue. |
That sounds reasonable to me. FYI I just approved (but not merged) PR 14433. |
I just merged PR 14433 |
This issue is a duplicate of bpo-37433 which has been fixed. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: