Skip to content
  • Ben Gamari's avatar
    2db11c08
    genSym: Reimplement via CAS on 32-bit platforms · 2db11c08
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    Previously the remaining use of the C implementation on 32-bit platforms
    resulted in a subtle bug, #24261. This was due to the C object (which
    used the RTS's `atomic_inc64` macro) being compiled without `-threaded`
    yet later being used in a threaded compiler.
    
    Side-step this issue by using the pure Haskell `genSym` implementation on
    all platforms. This required implementing `fetchAddWord64Addr#` in terms
    of CAS on 64-bit platforms.
    2db11c08
    genSym: Reimplement via CAS on 32-bit platforms
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    Previously the remaining use of the C implementation on 32-bit platforms
    resulted in a subtle bug, #24261. This was due to the C object (which
    used the RTS's `atomic_inc64` macro) being compiled without `-threaded`
    yet later being used in a threaded compiler.
    
    Side-step this issue by using the pure Haskell `genSym` implementation on
    all platforms. This required implementing `fetchAddWord64Addr#` in terms
    of CAS on 64-bit platforms.
Loading