cpython/Parser
Serhiy Storchaka 4398b788ff
[3.12] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (#134337)
If the error handler is used, a new bytes object is created to set as
the object attribute of UnicodeDecodeError, and that bytes object then
replaces the original data. A pointer to the decoded data will became invalid
after destroying that temporary bytes object. So we need other way to return
the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal().

_PyBytes_DecodeEscape() does not have such issue, because it does not
use the error handlers registry, but it should be changed for compatibility
with _PyUnicode_DecodeUnicodeEscapeInternal().
(cherry picked from commit 9f69a58623)
(cherry picked from commit 6279eb8c07)
2025-05-25 20:33:22 -07:00
..
action_helpers.c [3.12] gh-125331: Allow the parser to activate future imports on the fly (GH-125482) (#131063) 2025-03-10 22:13:59 +00:00
asdl.py bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25142) 2021-04-02 12:53:46 +09:00
asdl_c.py [3.12] gh-126105: Fix crash in ast module, when ._fields is delet… (#126132) 2024-10-29 20:20:40 +02:00
myreadline.c [3.12] gh-123321: Fix Parser/myreadline.c to prevent a segfault during a multi-threaded race (GH-123323) (#123677) 2024-09-05 14:25:38 +02:00
parser.c [3.12] gh-125331: Allow the parser to activate future imports on the fly (GH-125482) (#131063) 2025-03-10 22:13:59 +00:00
peg_api.c bpo-43244: Remove parser_interface.h header file (GH-25001) 2021-03-24 01:29:09 +01:00
pegen.c [3.12] gh-131762: Fixed dereferencing the pointer 'parser_token->metadata' with a NULL value (GH-131764) (#131775) 2025-03-26 19:01:36 +00:00
pegen.h [3.12] gh-125331: Allow the parser to activate future imports on the fly (GH-125482) (#131063) 2025-03-10 22:13:59 +00:00
pegen_errors.c [3.12] gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer (GH-116049) (#130065) 2025-02-13 01:42:24 +00:00
Python.asdl [3.12] gh-106145: Make end_{lineno,col_offset} required on type_param nodes (GH-106224) (#106295) 2023-07-01 00:15:18 +00:00
string_parser.c [3.12] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (#134337) 2025-05-25 20:33:22 -07:00
string_parser.h gh-102856: Initial implementation of PEP 701 (#102855) 2023-04-19 11:18:16 -05:00
token.c gh-102856: Python tokenizer implementation for PEP 701 (#104323) 2023-05-21 01:03:02 +01:00
tokenizer.c [3.12] gh-130618: Fix parser error when using lambdas inside f-strings (GH-130638) (#130644) 2025-03-01 18:10:07 +00:00
tokenizer.h [3.12] gh-121130: Fix f-string format specifiers with debug expressions (GH-121150) (#122063) 2024-07-20 19:05:01 +02:00