-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Stack overflow exception caused by test_marshal on Windows x64 #46539
Comments
S:\src\svn\svn.python.org\projects\python\trunk.x64\PCbuild>amd64\python_d python_d.exe crashes at this point with a stack overflow. Just |
Traced the problem down to the following minimal code snippet: import marshal
s = 'c' + ('X' * 4*4) + '{' * 2**20
marshal.loads(s) When Python/marshal.c:18 MAX_MARSHAL_STACK_DEPTH is 2000 (which is what if (p->depth > MAX_MARSHAL_STACK_DEPTH) {
p->depth--;
PyErr_SetString(PyExc_ValueError, "recursion limit exceeded");
return NULL;
} On Windows x64, a value of 1964 raises the recursion limit exception So, MAX_MARSHAL_STACK_DEPTH needs to be <= 1964 in order to prevent this Was there any science behind choosing 2000 as the current value? Should |
The situation was the same on win32 with the VC2005 debug build, some Can you try to raise the stack size on x64 builds? If 2Mb is enough for |
Fixed in r61509; bumped the stack size from 200000 to 210000, which |
I had the exact same problem when compiling the Python 2.7 branch with Visual Studio 2010. In debug mode and 64 bits, python will crash on test_loads_recursion in test_marshal and on the code provided in msg63536. Could you please reopen this issue? |
I don't have the issue anymore when bumping the stack size to 2300000. |
The 'official' PSF build for 2.7 (and 3.x) is done with VS2008, so this may not be the last problem you have. I am pretty sure this will never change for 2.7, but that is not to say we cannot make a simple change to accommodate VS2010. I am sure we will eventually update VS for 3.x. Can you test 3.2 or even better 3.3? |
Thanks Terry, I am aware of that. I will check with the py3k branch soon and report here if the same problem applies. |
Closing issue; this has been fixed. |
Reopening because I think this is again a problem for Win64 and 3.x. The Win64 buildbots always seem to crash on test_marshal (and I do too). It appears to be BugsTestCase.test_loads_2x_code() which crashes, which is virtually the same as test_loads_recursion(). |
Closing because this is caused by bpo-17206 and is already discussed there. |
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: