New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault when compiling many conditional expressions #76549
Comments
The following code reproducibly segfaults in version 2.7.13, 3.6.3 and the current git master (3.7.0a3+): code = "42 if True else 43\n" * 200000
compile(code, "foobar", "exec") This issue was originally found because the Jinja templating engine internally produces large tuples with many conditional expressions, thus triggering this bug (see pallets/jinja#784 ). |
Looks like 174,565 stack frames are a bit too much :) (gdb) bt (gdb) bt -50 |
Duplicate of bpo-31113? |
I think so, too. |
I tried out PR 3015 of Serhiy and this fixes the segfaults. So it seems to be a duplicate. As for backporting the fix: Is this a 'reliable' segfault (i.e. it always segfaults when the limit is exceeded) or could there be some silent data corruption? If data can be corrupted, I'd consider this bug very serious, otherwise it's a rather small annoyance. |
The fix for https://bugs.python.org/issue31113 also fixed this issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: