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
s_push: parser stack overflow MemoryError #48221
Comments
t =
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((0x280000))+(0x80000)-1)/(0x80000))*(0x80000))
+ 0x280000))+(0x10000)-1)/(0x10000))*(0x10000))+((0x10000*31
))))+(0x1000)-1)/(0x1000))*(0x1000)))+(16)-1)/(16))*(16)) +
0x100000))+(512)-1)/(512))*(512)) + 0xBF4000))+(8)-1)/(8))*(8)) +
0x200000) + 0x524000L)+(0x1000)-1)/(0x1000))*(0x1000)))+(3*253)) +
0))+(0x1000)-1)/(0x1000))*(0x1000)) +
0))+(0x1000)-1)/(0x1000))*(0x1000))+0x2B0000L))+(0x1000)-1)/(0x1000))*(0x1000))+0x4000)
+ 0))+(0x1000)-1)/(0x1000))*(0x1000))+0x600000L) +
0))+(0x1000)-1)/(0x1000))*(0x1000))+0x4000) +
0))+(0x1000)-1)/(0x1000))*(0x1000))+0x900000U) +
0))+(0x1000)-1)/(0x1000))*(0x1000)))+(0x2000)) +
0)+(0x1000)-1)/(0x1000))*(0x1000)) +
0x800L)+(0x1000)-1)/(0x1000))*(0x1000))+0x600000L)+0))+(0x1000)-1)/(0x1000))*(0x1000))+(((((((((((((
( (((((1920L) <= (1920L)) * (1920L) + ((1920L) < (1920L)) * (1920L))
))&0xFFF0)+16) + (0) )* (1088L + (0)) * 2)+(64L)-1)/(64L))*(64L))) >=
((((((( ( ((((1680L) <= (1920L)) * (1680L) + ((1920L) < (1680L)) *
(1920L)))&0xFFF0)+16) + (0))* (((1050L) <= (1080)) * (1050L) + ((1080) <
(1050L)) * (1080)) * 3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( (((((1920L)
<= (1920L)) * (1920L) + ((1920L) < (1920L)) * (1920L)) ))&0xFFF0)+16) +
(0) )* (1088L + (0)) * 2)+(64L)-1)/(64L))*(64L))) + (((((((( (
((((1680L) <= (1920L)) * (1680L) + ((1920L) < (1680L)) *
(1920L)))&0xFFF0)+16) + (0))* (((1050L) <= (1080)) * (1050L) + ((1080) <
(1050L)) * (1080)) * 3)+(64L)-1)/(64L))*(64L))) > ((((((( ( (((((1920L)
<= (1920L)) * (1920L) + ((1920L) < (1920L)) * (1920L)) ))&0xFFF0)+16) +
(0) )* (1088L + (0)) * 2)+(64L)-1)/(64L))*(64L)))) * ((((((( (
((((1680L) <= (1920L)) * (1680L) + ((1920L) < (1680L)) *
(1920L)))&0xFFF0)+16) + (0))* (((1050L) <= (1080)) * (1050L) + ((1080) <
(1050L)) * (1080)) * 3)+(64L)-1)/(64L))*(64L))))) >= (((((((((( (
((((1920L) <= (1920L)) * (1920L) + ((1920L) < (1920L)) *
(1920L)))&0xFFF0)+16) + (0) )* (1088L + (0)) *
3)+(64L)-1)/(64L))*(64L))) >= ((((((( ( ((((720L) <= (1920L)) * (720L) +
((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L + (0)) *
3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( ((((1920L) <= (1920L)) * (1920L)
+ ((1920L) < (1920L)) * (1920L)))&0xFFF0)+16) + (0) )* (1088L + (0)) *
3)+(64L)-1)/(64L))*(64L))) + (((((((( ( ((((720L) <= (1920L)) * (720L) +
((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L + (0)) *
3)+(64L)-1)/(64L))*(64L))) > ((((((( ( ((((1920L) <= (1920L)) * (1920L)
+ ((1920L) < (1920L)) * (1920L)))&0xFFF0)+16) + (0) )* (1088L + (0)) *
3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( ((((720L) <= (1920L)) * (720L) +
((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L + (0)) *
3)+(64L)-1)/(64L))*(64L)))))) * (((((((((( ( (((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)) ))&0xFFF0)+16) + (0) )* (1088L
+ (0)) * 2)+(64L)-1)/(64L))*(64L))) >= ((((((( ( ((((1680L) <= (1920L))
* (1680L) + ((1920L) < (1680L)) * (1920L)))&0xFFF0)+16) + (0))*
(((1050L) <= (1080)) * (1050L) + ((1080) < (1050L)) * (1080)) *
3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( (((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)) ))&0xFFF0)+16) + (0) )* (1088L
+ (0)) * 2)+(64L)-1)/(64L))*(64L))) + (((((((( ( ((((1680L) <= (1920L))
* (1680L) + ((1920L) < (1680L)) * (1920L)))&0xFFF0)+16) + (0))*
(((1050L) <= (1080)) * (1050L) + ((1080) < (1050L)) * (1080)) *
3)+(64L)-1)/(64L))*(64L))) > ((((((( ( (((((1920L) <= (1920L)) * (1920L)
+ ((1920L) < (1920L)) * (1920L)) ))&0xFFF0)+16) + (0) )* (1088L + (0)) *
2)+(64L)-1)/(64L))*(64L)))) * ((((((( ( ((((1680L) <= (1920L)) * (1680L)
+ ((1920L) < (1680L)) * (1920L)))&0xFFF0)+16) + (0))* (((1050L) <=
(1080)) * (1050L) + ((1080) < (1050L)) * (1080)) *
3)+(64L)-1)/(64L))*(64L))))) + ((((((((((( ( ((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)))&0xFFF0)+16) + (0) )* (1088L +
(0)) * 3)+(64L)-1)/(64L))*(64L))) >= ((((((( ( ((((720L) <= (1920L)) *
(720L) + ((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L +
(0)) * 3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( ((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)))&0xFFF0)+16) + (0) )* (1088L +
(0)) * 3)+(64L)-1)/(64L))*(64L))) + (((((((( ( ((((720L) <= (1920L)) *
(720L) + ((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L +
(0)) * 3)+(64L)-1)/(64L))*(64L))) > ((((((( ( ((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)))&0xFFF0)+16) + (0) )* (1088L +
(0)) * 3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( ((((720L) <= (1920L)) *
(720L) + ((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L +
(0)) * 3)+(64L)-1)/(64L))*(64L))))) > (((((((((( ( (((((1920L) <=
(1920L)) * (1920L) + ((1920L) < (1920L)) * (1920L)) ))&0xFFF0)+16) + (0)
)* (1088L + (0)) * 2)+(64L)-1)/(64L))*(64L))) >= ((((((( ( ((((1680L) <=
(1920L)) * (1680L) + ((1920L) < (1680L)) * (1920L)))&0xFFF0)+16) + (0))*
(((1050L) <= (1080)) * (1050L) + ((1080) < (1050L)) * (1080)) *
3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( (((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)) ))&0xFFF0)+16) + (0) )* (1088L
+ (0)) * 2)+(64L)-1)/(64L))*(64L))) + (((((((( ( ((((1680L) <= (1920L))
* (1680L) + ((1920L) < (1680L)) * (1920L)))&0xFFF0)+16) + (0))*
(((1050L) <= (1080)) * (1050L) + ((1080) < (1050L)) * (1080)) *
3)+(64L)-1)/(64L))*(64L))) > ((((((( ( (((((1920L) <= (1920L)) * (1920L)
+ ((1920L) < (1920L)) * (1920L)) ))&0xFFF0)+16) + (0) )* (1088L + (0)) *
2)+(64L)-1)/(64L))*(64L)))) * ((((((( ( ((((1680L) <= (1920L)) * (1680L)
+ ((1920L) < (1680L)) * (1920L)))&0xFFF0)+16) + (0))* (((1050L) <=
(1080)) * (1050L) + ((1080) < (1050L)) * (1080)) *
3)+(64L)-1)/(64L))*(64L)))))) * (((((((((( ( ((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)))&0xFFF0)+16) + (0) )* (1088L +
(0)) * 3)+(64L)-1)/(64L))*(64L))) >= ((((((( ( ((((720L) <= (1920L)) *
(720L) + ((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L +
(0)) * 3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( ((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)))&0xFFF0)+16) + (0) )* (1088L +
(0)) * 3)+(64L)-1)/(64L))*(64L))) + (((((((( ( ((((720L) <= (1920L)) *
(720L) + ((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L +
(0)) * 3)+(64L)-1)/(64L))*(64L))) > ((((((( ( ((((1920L) <= (1920L)) *
(1920L) + ((1920L) < (1920L)) * (1920L)))&0xFFF0)+16) + (0) )* (1088L +
(0)) * 3)+(64L)-1)/(64L))*(64L)))) * ((((((( ( ((((720L) <= (1920L)) *
(720L) + ((1920L) < (720L)) * (1920L)))&0xFFF0)+16) + (0)) * (576L +
(0)) * 3)+(64L)-1)/(64L))*(64L)))))) * 2)) +
0)+0x80)+0))+(8)-1)/(8))*(8)))+0x3600)+0))+(8)-1)/(8))*(8)))+0x400))+(8)-1)/(8))*(8))
+ 0)+(0x0))+(0x0))+(4096)-1)/(4096))*(4096)) +
0x1000)+(0x1000)-1)/(0x1000))*(0x1000)) +
0x1000)+(0x1000)-1)/(0x1000))*(0x1000)) |
This really abuse of the parser. If you really need this, you can bump |
Also affected, a code generator produced deeply nested code with the structure depicted below and then crashed: #!/usr/bin/python2 -BEsStt What would be the maximal nesting depth a generator can always expect to be compiled successfully on Python 2.7 and 3.5 on? Are there any other similar restrictions that need to be considered when writing a code generator? Or is generating code that way not the preferred solution anyway - the code generator should generate e.g. compiled binary Python code immediately? Note: in the end the exact same logic code will run as Python process, it is only about how it is loaded into the Python interpreter. Different from the code example in the bug create message, code with similar properties to the one from this example is generated to evaluate a mathematical model, thus not that random and meaningless compared to the putative fuzzer output from the first note. |
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: