mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix coroutine support on win32
Ruby master branch currently fails on win32 MINGW at this spec: https://github.com/ruby/spec/blob/master/core/thread/element_set_spec.rb MINGW makes use of setjmp3() implemented in MSVCRT.DLL. This function traverses the SEH list up to a terminating pointer 0xFFFFFFFF. It therefore currently segfaults on NULL. The SEH linked list must be terminated by 0xFFFFFFFF instead of NULL. This fixes the issue mentioned here: https://github.com/ruby/ruby/pull/2279#issuecomment-509508810
This commit is contained in:
parent
7c07300491
commit
853d91a04a
Notes:
git
2019-11-05 15:31:45 +09:00
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ static inline void coroutine_initialize(
|
|||
*--context->stack_pointer = (void*)start;
|
||||
|
||||
/* Windows Thread Information Block */
|
||||
*--context->stack_pointer = 0; /* fs:[0] */
|
||||
*--context->stack_pointer = (void*)0xFFFFFFFF; /* fs:[0] */
|
||||
*--context->stack_pointer = (void*)top; /* fs:[4] */
|
||||
*--context->stack_pointer = (void*)stack; /* fs:[8] */
|
||||
|
||||
|
|
Loading…
Reference in a new issue