Fix chained hardware exception handling on Unix (#12344)
authorJan Vorlicek <janvorli@microsoft.com>
Sat, 17 Jun 2017 12:13:39 +0000 (14:13 +0200)
committerGitHub <noreply@github.com>
Sat, 17 Jun 2017 12:13:39 +0000 (14:13 +0200)
commita02634eb41284dbd432ef84aa38f526f955e5f64
tree3b688a97e457dc7ee3bc9f507d9a6c8f693384d6
parenta6ed71c6472c8ea0f680507ae34f56aeaf6bb3d2
Fix chained hardware exception handling on Unix (#12344)

There is an issue when hardware exception occurs while handling another hardware exception. In such case,
the exception unwinding ends up in an infinite loop. It is caused by the kernel reusing the same location
for signal handler context.

The fix is to use a windows style context local variable in the common_signal_handler that contains
the right context - it is the original signal context converted to windows style context.
src/pal/src/exception/seh-unwind.cpp
src/pal/src/exception/signal.cpp