Fix coroutine implementaion on Windows-Arm64
When setjmp/longjmp/exceptions are used on Windows it's necessary to store+restore additional information from the TEB. I didn't find any official documentation about the values to be saved, but found the corresponding boost/context implemenataion: https://github.com/boostorg/context/commit/abf8e04e23cf05a499594e674d1c90db39117662
This is similar to the special TIB handling on x86/x86_64 on Windows.
Without this fix an exception in a fiber segfaults without any output: ruby -e "Fiber.new{ raise 'test' }.resume"
Fix coroutine implementaion on Windows-Arm64
When setjmp/longjmp/exceptions are used on Windows it's necessary to store+restore additional information from the TEB.
I didn't find any official documentation about the values to be saved, but found the corresponding boost/context implemenataion:
https://github.com/boostorg/context/commit/abf8e04e23cf05a499594e674d1c90db39117662
This is similar to the special TIB handling on x86/x86_64 on Windows.
Without this fix an exception in a fiber segfaults without any output:
ruby -e "Fiber.new{ raise 'test' }.resume"