Skip to content

Commit f46333b

Browse files
authored
gh-107450: Remove unnecessary overflow check in parser error handler (#110940)
1 parent a77180e commit f46333b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Parser/pegen_errors.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,6 @@ _PyPegen_raise_error(Parser *p, PyObject *errtype, int use_mark, const char *err
240240
col_offset = 0;
241241
} else {
242242
const char* start = p->tok->buf ? p->tok->line_start : p->tok->buf;
243-
if (p->tok->cur - start > INT_MAX) {
244-
PyErr_SetString(PyExc_OverflowError,
245-
"Parser column offset overflow - source line is too big");
246-
p->error_indicator = 1;
247-
return NULL;
248-
}
249243
col_offset = Py_SAFE_DOWNCAST(p->tok->cur - start, intptr_t, int);
250244
}
251245
} else {

0 commit comments

Comments
 (0)