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
Assertion failure in get_error_line_from_tokenizer_buffers
in pegen_errors.c
#112387
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 <pablogsal@gmail.com>
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 <pablogsal@gmail.com>
…ds tokenize errors (pythonGH-112409) (cherry picked from commit 45d6485) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Thanks for the report! |
…ds tokenize errors (pythonGH-112409) (cherry picked from commit 45d6485) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…ds tokenize errors (python#112409) Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
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: