Add a SIGSEGV signal handler which detects stack overflow
authorAndrii Grynenko <andrii@fb.com>
Fri, 3 Jun 2016 22:01:28 +0000 (15:01 -0700)
committerFacebook Github Bot 2 <facebook-github-bot-2-bot@fb.com>
Fri, 3 Jun 2016 22:08:24 +0000 (15:08 -0700)
commit9c0a6e4ed02ffc39ee393fbfff73dec76fcb5daa
tree05e03beb93191eb5b175521170c146e898efb041
parent8aac0e33471dad37f6af287b0b85de2b35fc33a5
Add a SIGSEGV signal handler which detects stack overflow

Summary: GuardPageAllocator now keeps a track of all protected pages. If SIGSEGV occurs, signal handler can check address at fault against protected pages and if it matches - we got a fiber stack overflow.

Reviewed By: yfeldblum

Differential Revision: D3386960

fbshipit-source-id: 775b36ee08fecbbd87da0025f794717c222f5cce
folly/fibers/GuardPageAllocator.cpp