Message370753
| Author |
BTaskaya |
| Recipients |
BTaskaya |
| Date |
2020-06-05.09:46:26 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> |
| In-reply-to |
|
| Content |
import ast
t = ast.fix_missing_locations(ast.Expression(ast.Name("True", ast.Load())))
compile(t, "<t>", "eval")
compilation of this AST can crash the interpreter for 3.8+
test_constant_as_name (test.test_ast.AST_Tests) ... python: Python/compile.c:3559: compiler_nameop: Assertion `!_PyUnicode_EqualToASCIIString(name, "None") && !_PyUnicode_EqualToASCIIString(name, "True") && !_PyUnicode_EqualToASCIIString(name, "False")' failed.
Fatal Python error: Aborted
I've encountered this while running test suite of 'pytest' with the current master, so I guess there are some usages related this out there. IMHO we should validate this on the PyAST_Validate step to prevent this kind of crashes. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2020-06-05 09:46:27 | BTaskaya | set | recipients:
+ BTaskaya |
| 2020-06-05 09:46:27 | BTaskaya | set | messageid: <1591350387.83.0.288817090794.issue40870@roundup.psfhosted.org> |
| 2020-06-05 09:46:27 | BTaskaya | link | issue40870 messages |
| 2020-06-05 09:46:27 | BTaskaya | create | |
|