cvs commit: fptools/libraries/base/GHC ForeignPtr.hs

Simon Marlow simonmar@glass.cse.ogi.edu
Wed, 10 Sep 2003 04:47:03 -0700


simonmar    2003/09/10 04:47:03 PDT

  Modified files:
    libraries/base/GHC   ForeignPtr.hs 
  Log:
  The finalizer for a ForeignPtr created with mallocForeignPtr better
  "touch#" the MutableByteArray# after running the other finalizers,
  otherwise the memory might be garbage collected before we've finished
  running the finalizers.
  
  This can cause crashes if you add any extra finalizers to a ForeignPtr
  created with mallocForeignPtr.
  
  SourceForge bug: #802692
  
  Revision  Changes    Path
  1.10      +6 -2      fptools/libraries/base/GHC/ForeignPtr.hs