From aeca1887d2053818607628f70756cdfea4fe63ea Mon Sep 17 00:00:00 2001 From: Firejox Date: Sat, 30 Nov 2019 06:00:07 +0800 Subject: [PATCH] Fix incorrectly initializing win32 fiber stack (#8513) See https://github.com/crystal-lang/crystal/pull/7995#pullrequestreview-321946974 --- src/fiber/context/x86_64-microsoft.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fiber/context/x86_64-microsoft.cr b/src/fiber/context/x86_64-microsoft.cr index 8b919ade7961..254d9bf21518 100644 --- a/src/fiber/context/x86_64-microsoft.cr +++ b/src/fiber/context/x86_64-microsoft.cr @@ -15,8 +15,8 @@ class Fiber # The following two values are stored in the Thread Information Block (NT_TIB) # and are used by Windows to track the current stack limits - stack_ptr[-2] = @stack_bottom # %gs:0x08: Stack Bottom - stack_ptr[-3] = @stack # %gs:0x10: Stack Limit + stack_ptr[-2] = @stack # %gs:0x10: Stack Limit + stack_ptr[-3] = @stack_bottom # %gs:0x08: Stack Base end # :nodoc: