[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Revert "rts: Drop racy assertion"

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Jan 12 07:48:53 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
f0d1bb00 by Ben Gamari at 2023-01-12T02:48:42-05:00
Revert "rts: Drop racy assertion"

The logic here was inverted. Reverting the commit to avoid confusion
when examining the commit history.

This reverts commit b3eacd64fb36724ed6c5d2d24a81211a161abef1.

- - - - -
020d35fb by Ben Gamari at 2023-01-12T02:48:42-05:00
rts: Drop racy assertion

0e274c39bf836d5bb846f5fa08649c75f85326ac added an assertion in
`dirty_MUT_VAR` checking that the MUT_VAR being dirtied was clean.
However, this isn't necessarily the case since another thread may have
raced us to dirty the object.

- - - - -
d6632024 by Ben Gamari at 2023-01-12T02:48:42-05:00
configure: Fix escaping of `$tooldir`

In !9547 I introduced `$tooldir` directories into GHC's default link and
compilation flags to ensure that our C toolchain finds its own headers
and libraries before others on the system. However, the patch was subtly
wrong in the escaping of `$tooldir`. Fix this.

Fixes #22561.

- - - - -


2 changed files:

- m4/fp_settings.m4
- rts/sm/Storage.c


Changes:

=====================================
m4/fp_settings.m4
=====================================
@@ -10,12 +10,12 @@ AC_DEFUN([FP_SETTINGS],
         # See Note [tooldir: How GHC finds mingw on Windows]
         mingw_bin_prefix='$$tooldir/mingw/bin/'
         SettingsCCompilerCommand="${mingw_bin_prefix}clang.exe"
-        SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2 -I$$tooldir/mingw/include"
+        SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2 -I\$\$tooldir/mingw/include"
         SettingsCxxCompilerCommand="${mingw_bin_prefix}clang++.exe"
-        SettingsCxxCompilerFlags="$CONF_CXX_OPTS_STAGE2 -I$$tooldir/mingw/include"
-        SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2 -L$$tooldir/mingw/lib -L$$tooldir/mingw/x86_64-w64-mingw32/lib"
+        SettingsCxxCompilerFlags="$CONF_CXX_OPTS_STAGE2 -I\$\$tooldir/mingw/include"
+        SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2 -L\$\$tooldir/mingw/lib -L\$\$tooldir/mingw/x86_64-w64-mingw32/lib"
         SettingsHaskellCPPCommand="${mingw_bin_prefix}clang.exe"
-        SettingsHaskellCPPFlags="$HaskellCPPArgs -I$$tooldir/mingw/include"
+        SettingsHaskellCPPFlags="$HaskellCPPArgs -I\$\$tooldir/mingw/include"
         SettingsLdCommand="${mingw_bin_prefix}ld.lld.exe"
         SettingsLdFlags=""
         # LLD does not support object merging (#21068)


=====================================
rts/sm/Storage.c
=====================================
@@ -1404,7 +1404,7 @@ allocatePinned (Capability *cap, W_ n /*words*/, W_ alignment /*bytes*/, W_ alig
 void
 dirty_MUT_VAR(StgRegTable *reg, StgMutVar *mvar, StgClosure *old)
 {
-#if defined(THREADED_RTS)
+#if !defined(THREADED_RTS)
     // This doesn't hold in the threaded RTS as we may race with another thread.
     ASSERT(RELAXED_LOAD(&mvar->header.info) == &stg_MUT_VAR_CLEAN_info);
 #endif



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d2b9771ce2875bb9a9788bec7e6fbddefe29d856...d66320245bc2a1146ec4978e25b2d068ec7bf824

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d2b9771ce2875bb9a9788bec7e6fbddefe29d856...d66320245bc2a1146ec4978e25b2d068ec7bf824
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/20230112/fa3d1438/attachment-0001.html>


More information about the ghc-commits mailing list