Fix crash with +RTS -xc (occasional cgrun057(profthreaded) failure)
authorSimon Marlow <marlowsd@gmail.com>
Fri, 6 Jan 2012 10:19:37 +0000 (10:19 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 6 Jan 2012 11:31:34 +0000 (11:31 +0000)
Don't try to print a stack trace from raiseAsync() when there's no
exception - we might just be deleting the thread, or suspending
duplicate work.

rts/RaiseAsync.c

index 2887617..7b7fef1 100644 (file)
@@ -737,7 +737,7 @@ raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception,
      * See also Exception.cmm:stg_raisezh.
      * This wasn't done for asynchronous exceptions originally; see #1450 
      */
-    if (RtsFlags.ProfFlags.showCCSOnException)
+    if (RtsFlags.ProfFlags.showCCSOnException && exception != NULL)
     {
         fprintCCS_stderr(tso->prof.cccs,exception,tso);
     }