fix random segfaults when using ForeignPtr

Bug #382803 reported by Simon Marlow
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ghc6 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

If you're merging 6.10.3 into karmic, you might want to consider also pulling in this change from the forthcoming 6.10.4. It fixes a problem that can randomly cause segfaults in code that uses ForeignPtrs, and there's no workaround. The fix will not cause a change in ABIs, so shouldn't force a recompile of dependent packages.

Source package: 6.10.3-2ubuntu1

Fix:

Fri May 15 10:23:56 BST 2009 Simon Marlow <email address hidden>
  * fix cut-and-pasto in mkWeakForeignEnv#, causing random segfaults
    hunk ./rts/PrimOps.cmm 370
    - ALLOC_PRIM( SIZEOF_StgWeak, R1_PTR & R2_PTR & R3_PTR, mkWeakForeignEnvzh_fast );
    + ALLOC_PRIM( SIZEOF_StgWeak, R1_PTR & R2_PTR, mkWeakForeignEnvzh_fast );

Revision history for this message
Iain Lane (laney) wrote :

Thanks a lot. I have forwarded the patch to the Debian maintainer and it will be fixed there before being synced across to Ubuntu.

Changed in ghc6 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Iain Lane (laney) wrote :

By the way, is 6.10.4 expected out soon? I only ask as we have to rebuild all libs/apps for the new ABI and this is a rather time-consuming activity so I'd rather not have to do it too often. See [0] for a list of those that are currently uninstallable in Karmic due to ABI breakage.

[0] http://qa.ubuntuwire.com/debcheck/debcheck.py?dist=karmic&list=relationship-Depends&arch=ANY

Revision history for this message
Simon Marlow (simonmar) wrote :

6.10.4 will probably be out in a couple of weeks or so, we're giving it a little while longer to see if any more bugs are discovered.

I'm a little hazy on the Ubuntu development process. I take it that you haven't recompiled all the packages that depend on GHC yet, and hence you want to get all the ABI changes in now before you do so?

FYI, the only other important fix that affects Linux in 6.10.4 is this one:

http://hackage.haskell.org/trac/ghc/ticket/3207

Fri May 15 15:36:08 BST 2009 Simon Marlow <email address hidden>
  * Fix #3207: add has_side_effects = True for lots of primops
  and document primOpHasSideEffects

This fix will change ABIs.

Revision history for this message
Iain Lane (laney) wrote :

Updating to a new upstream release is a lot of work for us as distro developers due to the recompilation requirement so I'd rather not do it if we'll only need to do it again for 6.10.4 in a short amount of time anyway. We always try to follow Debian if the release schedule allows us to, so if they upload 6.10.4 in time then we will do the transition on that release. No point doing it now only to have to do it again soon anyway.

Thanks for your information!

Iain Lane (laney)
Changed in ghc6 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.