diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-02-13 09:42:22 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-02-13 09:42:22 +0000 |
commit | 5cb998e66c8a342dad9ea03fcb5126f12ec50156 (patch) | |
tree | a5ae719b8e10a5ac8cb4537b0a20dc28d557ed7b /winsup/cygwin/cygtls.cc | |
parent | 9cb5dea0e22c3fdde4f0c638b052a0186587cf8f (diff) | |
download | cygnal-5cb998e66c8a342dad9ea03fcb5126f12ec50156.tar.gz cygnal-5cb998e66c8a342dad9ea03fcb5126f12ec50156.tar.bz2 cygnal-5cb998e66c8a342dad9ea03fcb5126f12ec50156.zip |
* cygtls.cc (_cygtls::init_exception_handler): Revert patch
from 2005-12-02.
* exceptions.cc (stack_info::walk): Add workaround for NT 5.2
64 bit OSes.
* wincap.h (wincaps::has_restricted_stack_args): New element.
* wincap.cc: Implement above element throughout.
(wincapc::init): Reset has_restricted_stack_args if not running
under WOW64.
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r-- | winsup/cygwin/cygtls.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index 2bc7e85ba..af2723e95 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -260,7 +260,23 @@ void _cygtls::init_exception_handler (exception_handler *eh) { el.handler = eh; - el.prev = ⪙ + /* Apparently Windows stores some information about an exception and tries + to figure out if the SEH which returned 0 last time actually solved the + problem, or if the problem still persists (e.g. same exception at same + address). In this case Windows seems to decide that it can't trust + that SEH and calls the next handler in the chain instead. + + At one point this was a loop (el.prev = ⪙). This outsmarted the + above behaviour. Unfortunately this trick doesn't work anymore with + Windows 2008, which irremediably gets into an endless loop, taking 100% + CPU. That's why we reverted to a normal SEH chain. + + On the bright side, Windows' behaviour is covered by POSIX: + + "If and when the function returns, if the value of sig was SIGFPE, + SIGILL, or SIGSEGV or any other implementation-defined value + corresponding to a computational exception, the behavior is undefined." */ + el.prev = _except_list; _except_list = ⪙ } |