Implement stack overflow protection for linux based on actual stack depth #130396
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
OS-linux
type-feature
A feature request or enhancement
Linux doesn't offer an API for determining the current stack bounds, at least not that I am aware of.
This means we will need to probe the stack using a SIGSEGV handler and longjmp/setjump.
It is somewhat ugly but should work.
Actually, it looks like
pthread_get_stackaddr_np
might work, and avoid all the complexity of the signal handler. In theory, it should work for MacOS as well.Linked PRs
The text was updated successfully, but these errors were encountered: