[New-bugs-announce] [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled
Xi Ruoyao
report at bugs.python.org
Wed May 8 13:23:39 EDT 2019
New submission from Xi Ruoyao <xry111 at mengyan1223.wang>:
In faulthandler.c STACK_OVERFLOW_MAX_SIZE is defined to 100 * 1024 * 1024 (100MB). But recently KPTI has been applied to mitigate Meltdown (CVE-2017-5754) so the userspace stack pointer may be very close to 0xffffffff on Linux systems with 32-bit x86. For example, on my laptop it's sometimes 0xffffcc20. So the expression
sp + STACK_OVERFLOW_MAX_SIZE
overflows and becomes a very small number. That causes faulthandler._stack_overflow() to bail out after only one recursive call:
Traceback (most recent call last):
File "<string>", line 1, in <module>
RuntimeError: unable to raise a stack overflow (allocated 4124 bytes on the stack, 1 recursive calls)
----------
components: Extension Modules
messages: 341915
nosy: xry111
priority: normal
severity: normal
status: open
title: faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36856>
_______________________________________
More information about the New-bugs-announce
mailing list