1. 18 Aug, 2009 1 commit
    • Simon Marlow's avatar
      Fix #3429: a tricky race condition · c5cafbcc
      Simon Marlow authored
      There were two bugs, and had it not been for the first one we would
      not have noticed the second one, so this is quite fortunate.
      
      The first bug is in stg_unblockAsyncExceptionszh_ret, when we found a
      pending exception to raise, but don't end up raising it, there was a
      missing adjustment to the stack pointer.  
      
      The second bug was that this case was actually happening at all: it
      ought to be incredibly rare, because the pending exception thread
      would have to be killed between us finding it and attempting to raise
      the exception.  This made me suspicious.  It turned out that there was
      a race condition on the tso->flags field; multiple threads were
      updating this bitmask field non-atomically (one of the bits is the
      dirty-bit for the generational GC).  The fix is to move the dirty bit
      into its own field of the TSO, making the TSO one word larger (sadly).
      c5cafbcc
  2. 17 Aug, 2009 3 commits
  3. 06 Aug, 2009 2 commits
  4. 18 Aug, 2009 1 commit
  5. 17 Aug, 2009 2 commits
    • Thomas Schilling's avatar
      Make the dynamic linker thread-safe. · 4fa44a3a
      Thomas Schilling authored
        
      The current implementation is rather pessimistic.  The persistent
      linker state is now an MVar and all exported Linker functions are
      wrapped in modifyMVar calls.  This is serves as a big lock around all
      linker functions.
      
      There might be a chance for more concurrency in a few places. E.g.,
      extending the closure environment and loading packages might be
      independent in some cases.  But for now it's better to be on the safe
      side.
      4fa44a3a
    • Thomas Schilling's avatar
      Make access to NameCache atomic. Sometimes needs a lock. · 9f68c348
      Thomas Schilling authored
      'readBinIface' updates the name cache in a way that is hard to use
      with atomicModifyIORef, so this patch introduces a lock for this case.
      All other updates use atomicModifyIORef.
      
      Having a single lock is quite pessimistic, so it remains to be seen
      whether this will become a problem.  In principle we only need to make
      sure that we do not load the same file concurrently (or that it's
      idempotent).  In practice we also need to ensure that concurrent reads
      do not cancel each other out (since the new NameCache may be based on
      an outdated version).
      9f68c348
  6. 16 Aug, 2009 2 commits
  7. 22 Jul, 2009 1 commit
  8. 16 Aug, 2009 2 commits
  9. 14 Aug, 2009 3 commits
  10. 13 Aug, 2009 2 commits
    • Ian Lynagh's avatar
      Only look up whether a module's SOURCE-imported if it's in the current package · 0e3d5132
      Ian Lynagh authored
      Suppose we import anotherPackage:M, which exports things from
      anotherPackage:Internal. Then GHC will want to read
      anotherPackage:Internal.hi.
      
      However, if we have also SOURCE-imported thisPackage:Internal then
      we don't want GHC to try to read anotherPackage:Internal.hi-boot
      instead.
      
      The mapping that tells us whether a module is SOURCE-imported uses just
      the module name for the key, so we have to check the package ID before
      looking it up.
      
      Fixes #3007.
      0e3d5132
    • simonpj@microsoft.com's avatar
      Fix Trac #3409: type synonyms that discard their arguments · 2d1262b6
      simonpj@microsoft.com authored
      Type synonyms that don't mention one of their type parameters on the 
      RHS are a pain in the neck.  This patch fixes a long-standing bug (that
      simply has not appeared before) in that exprType could return a type
      mentioning an existentially-quantified variable (in one of those ignored
      argument positions).
      
      See CoreUtils Note [Existential variables and silly type synonyms]
      
      The fix is not entirely beautiful, but it works, and is very localised.
      2d1262b6
  11. 12 Aug, 2009 2 commits
  12. 11 Aug, 2009 5 commits
  13. 10 Aug, 2009 2 commits
  14. 17 Jul, 2009 1 commit
  15. 09 Aug, 2009 2 commits
  16. 07 Aug, 2009 1 commit
  17. 08 Aug, 2009 4 commits
  18. 01 Aug, 2009 1 commit
  19. 07 Aug, 2009 1 commit
  20. 03 Aug, 2009 1 commit
    • Simon Marlow's avatar
      Add -r option to darcs-all, and remove push-all (#3375) · e0f75029
      Simon Marlow authored
      Contributed by: seliopou@gmail.com
          
      This patch modifies darcs-all to have feature parity with push-all by
      recognizing two new options.
      
          * -i, equivalent to --ignore-failure in push-all
          * -r <repo>, specifies the remote repository darcs commands will use
      
      Some example commands:
      
      Get the libraries from a repository of your choosing. This is useful
      when working with a git mirror:
      
          $ ./darcs-all -r http://darcs.haskell.org get
      
      Pull changes. Used to be:
      
          $ ./push-all --pull http://darcs.haskell.org
      
      Is now:
      
          $ ./darcs-all -r http://darcs.haskell.org pull
      
      Or to use the default remote of the ghc repository:
      
          $ ./darcs-all pull
      e0f75029
  21. 07 Aug, 2009 1 commit
    • Ian Lynagh's avatar
      Add a kludge to fix building shared libs · 74df25b1
      Ian Lynagh authored
      The .dyn_hi files currently depend on the .dyn_hi files of modules that
      they import. But they actually want the .hi files of modules from
      another package.This we make the .dyn_hi files depend on the .hi files
      so we are sure that they exist and are up-to-date.
      74df25b1