From c4799c6289f900ee4a92d5dc89c3c8860010a6d9 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Fri, 22 Jul 2022 01:04:37 +0800 Subject: [PATCH] Fix fiber clean loop on Windows (#12300) --- src/crystal/system/win32/fiber.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crystal/system/win32/fiber.cr b/src/crystal/system/win32/fiber.cr index c987ed25b3b2..9620dbaf1c79 100644 --- a/src/crystal/system/win32/fiber.cr +++ b/src/crystal/system/win32/fiber.cr @@ -13,7 +13,7 @@ module Crystal::System::Fiber end def self.free_stack(stack : Void*, stack_size) : Nil - if LibC.VirtualFree(stack, stack_size, LibC::MEM_RELEASE) == 0 + if LibC.VirtualFree(stack, 0, LibC::MEM_RELEASE) == 0 raise RuntimeError.from_winerror("VirtualFree") end end