Repository navigation
Commit 2f58570
scope the recursion limit to run_module and clean up dead code
sys.setrecursionlimit(1500000000) was an import-time side effect
inherited from the 2020 py-wasm-era script, and the value effectively
disabled Python's recursion guard. The limit is only needed because pyk
serializes kore terms recursively (pyk.kore.syntax.Pattern.write) and
the depth grows with module size: basic-features.wat needs about 4000,
while the default 1000 is enough for everything else. Set 20000 inside
run_module, never lowering an externally raised limit.
Also remove an assert made dead by check=True and a try/except that
re-raised as a bare Exception, hiding the original exception type.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 5f16b3a commit 2f58570
1 file changed
Lines changed: 14 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
| |||
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
34 | | - | |
35 | | - | |
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
| |||
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
47 | 44 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 45 | + | |
| 46 | + | |
52 | 47 | | |
53 | | - | |
54 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
55 | 52 | | |
56 | | - | |
57 | | - | |
| 53 | + | |
| 54 | + | |
58 | 55 | | |
59 | | - | |
60 | | - | |
| 56 | + | |
| 57 | + | |
0 commit comments