-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Assertion failure in get_error_line_from_tokenizer_buffers
in pegen_errors.c
#112387
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
Comments
See also #112388 |
cc @pablogsal That commit introduced this code: Py_ssize_t relative_lineno = p->starting_lineno ? lineno - p->starting_lineno + 1 : lineno;
for (int i = 0; i < relative_lineno - 1; i++) {
char *new_line = strchr(cur_line, '\n') + 1;
assert(new_line != NULL && new_line < p->tok->inp);
if (new_line == NULL || new_line >= p->tok->inp) {
break;
}
cur_line = new_line; Note that the assertion and the following conditional are incorrect. |
Thanks for the report! I am taking a look but notice the code you are reporting for that commit has already been fixed, so this is something else: Lines 281 to 291 in 0303a9f
|
…ds tokenize errors Signed-off-by: Pablo Galindo <[email protected]>
Oh, interesting! There must be another cause of that assertion failure in newer commits. I'll have to bisect again and look at stack traces, not just the assertion failure. |
Don't worry I think I know what that is I have a PR up and will discuss and we can back port it once @lysnikolaou takes a look |
…enize errors (#112409) Signed-off-by: Pablo Galindo <[email protected]>
…ds tokenize errors (pythonGH-112409) (cherry picked from commit 45d6485) Co-authored-by: Pablo Galindo Salgado <[email protected]> Signed-off-by: Pablo Galindo <[email protected]>
Thanks for the report! |
…ds tokenize errors (pythonGH-112409) (cherry picked from commit 45d6485) Co-authored-by: Pablo Galindo Salgado <[email protected]> Signed-off-by: Pablo Galindo <[email protected]>
…rds tokenize errors (GH-112409) (#112468) gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409) (cherry picked from commit 45d6485) Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
…rds tokenize errors (GH-112409) (#112469) gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409) (cherry picked from commit 45d6485) Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
…ds tokenize errors (python#112409) Signed-off-by: Pablo Galindo <[email protected]>
…ds tokenize errors (python#112409) Signed-off-by: Pablo Galindo <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Crash report
What happened?
I found some crashes when adding an additional fuzz target in #111721.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
Python 3.13.0a1+ (heads/main:3701f3bc10, Nov 24 2023, 23:05:42) [Clang 15.0.0 (clang-1500.0.40.1)]
Linked PRs
The text was updated successfully, but these errors were encountered: