Message303651
On my 64-bit Windows 10, the echo here would print -1073741571:
python -c "import faulthandler; faulthandler._fatal_error(b'a' * 2 ** 22)"
echo %errorlevel%
This is code c00000fd, which windbg describes as 'Stack overflow'.
This happens because Py_FatalError() (in Python/pylifecycle.c) does the following
(on Windows only):
len = strlen(msg);
/* Convert the message to wchar_t. This uses a simple one-to-one
conversion, assuming that the this error message actually uses ASCII
only. If this ceases to be true, we will have to convert. */
buffer = alloca( (len+1) * (sizeof *buffer));
for( i=0; i<=len; ++i)
buffer[i] = msg[i];
Note that (IIUC) running the aforementioned cmd wouldn't cause a post-mortem
debugger to pop-up, because faulthandler_fatal_error_py()
(in Modules/faulthandler.c) first calls faulthandler_suppress_crash_report(),
and then calls Py_FatalError(). |
|
Date |
User |
Action |
Args |
2017-10-03 21:40:12 | Oren Milman | set | recipients:
+ Oren Milman, vstinner |
2017-10-03 21:40:12 | Oren Milman | set | messageid: <1507066812.21.0.213398074469.issue31683@psf.upfronthosting.co.za> |
2017-10-03 21:40:12 | Oren Milman | link | issue31683 messages |
2017-10-03 21:40:12 | Oren Milman | create | |
|