Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
Correcting my previous post (deleted): You can get an assert failure without ASAN with this patch: diff --git a/Parser/pegen.c b/Parser/pegen.c index e29910bf86..65fa44921f 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -145,6 +145,9 @@ byte_offset_to_character_offset(PyObject *line, int col_offset) if (!str) { return 0; } + assert(col_offset <= PyUnicode_GET_LENGTH(line)); PyObject *text = PyUnicode_DecodeUTF8(str, col_offset, "replace"); if (!text) { return 0; ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40958> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com