Go's thread creation looks at the SYS_clone stack parameter post-syscall, which DR was not restoring after replacing it with the dstack. We fix that here.
That bug led to Go programs using the dstack, resulting in them executing DR memory, where DR tried to raise an artificial SIGSEGV. However, this ended up in Go's signal handler where SIGSEGV was blocked, and due to various #196 (closed) checks lining up incorrectly, this led to an infinite loop.
To fully fix the infinite loop and get the SIGSEGV to the outer lever, I changed os_forge_exception() to set SI_KERNEL and added a forged flag into execute_default_action() and avoid trying to call decode_sizeof() there (just crashes b/c SIGSEGV handler removed). I alo cleared the app's signal mask, to avoid SIGSEGV being blocked during cleanup, causing the supposed-to-be-fatal SYS_kill to just return, and another hang in debug build in debug_infinite_loop.
Issue: #196 (closed), #3171 (closed) Fixes #3171 (closed)