[Git][ghc/ghc][wip/T25838] rts: Ensure that WinIO flag is set when --io-manager=auto

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Mar 11 22:42:22 UTC 2025



Ben Gamari pushed to branch wip/T25838 at Glasgow Haskell Compiler / GHC


Commits:
9d680679 by GHC GitLab CI at 2025-03-11T18:42:10-04:00
rts: Ensure that WinIO flag is set when --io-manager=auto

As noted in #25838, previously `selectIOManager` failed to set
`rts_IOManagerIsWin32Native` in its `IO_MNGR_FLAG_AUTO`. This meant
that the MIO path was taken when WinIO was supposedly selected,
resulting in chaos.

Fixes #25838.

- - - - -


1 changed file:

- rts/IOManager.c


Changes:

=====================================
rts/IOManager.c
=====================================
@@ -233,7 +233,6 @@ void selectIOManager(void)
 #if defined(IOMGR_ENABLED_WINIO)
         case IO_MNGR_FLAG_WINIO:
             iomgr_type = IO_MANAGER_WINIO;
-            rts_IOManagerIsWin32Native = true;
             break;
 #endif
 
@@ -246,6 +245,10 @@ void selectIOManager(void)
         default:
           barf("selectIOManager: %d", RtsFlags.MiscFlags.ioManager);
     }
+
+#if defined(mingw32_HOST_OS)
+    rts_IOManagerIsWin32Native = iomgr_type == IO_MANAGER_WINIO;
+#endif
 }
 
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9d680679be7e91f46a1f6b567b50ebf43c37f40c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9d680679be7e91f46a1f6b567b50ebf43c37f40c
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250311/68834ca5/attachment.html>


More information about the ghc-commits mailing list