Message358952
We can probably implement something like this to prevent this happening
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index daac0966f5..f9da52da7f 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -559,6 +559,11 @@ class Obj2ModVisitor(PickleVisitor):
self.emit("asdl_seq_SET(%s, i, val);" % field.name, depth+2)
self.emit("}", depth+1)
else:
+ self.emit("if (obj == tmp) {", depth+1)
+ self.emit("PyErr_SetString(PyExc_RuntimeError, \"Recursing fields "
+ "are not supported for AST nodes.\");", depth+2, reflow=False)
+ self.emit("goto failed;", depth+2)
+ self.emit("}", depth+1)
self.emit("res = obj2ast_%s(tmp, &%s, arena);" %
(field.type, field.name), depth+1)
self.emit("if (res != 0) goto failed;", depth+1) |
|
| Date |
User |
Action |
Args |
| 2019-12-28 17:41:12 | BTaskaya | set | recipients:
+ BTaskaya, georg.brandl, gregory.p.smith, belopolsky, benjamin.peterson, meador.inge, eric.snow |
| 2019-12-28 17:41:12 | BTaskaya | set | messageid: <1577554872.81.0.341402865021.issue11105@roundup.psfhosted.org> |
| 2019-12-28 17:41:12 | BTaskaya | link | issue11105 messages |
| 2019-12-28 17:41:12 | BTaskaya | create | |
|