[ ghc-Bugs-1073424 ] Segfault during (FFI)malloc with ghci

SourceForge.net noreply at sourceforge.net
Sat Nov 27 06:24:05 EST 2004


Bugs item #1073424, was opened at 2004-11-25 22:17
Message generated for change (Comment added) made by spanne
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1073424&group_id=8032

Category: None
Group: 6.2.1
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Segfault during (FFI)malloc with ghci

Initial Comment:
From: Tom Pledger <tkpledger at yahoo.co.nz>

The attached program halts with a segmentation fault 
when run using ghci, but not when compiled with ghc 
and run natively

Platform: Mandrake, linux kernel version 2.4.27-xena-1


----------------------------------------------------------------------

>Comment By: Sven Panne (spanne)
Date: 2004-11-27 12:24

Message:
Logged In: YES 
user_id=50298

This is an application error, not a GHC one, see patch
below. Electric Fence is your friend... :-)

--- framework.c.~1~	2004-11-25 21:58:59.000000000 +0100
+++ framework.c	2004-11-27 12:21:59.525663880 +0100
@@ -172,7 +172,7 @@
       (*ap)[i].to      = v;
       (*ap)[i].score   = score;
       (*ap)[i+1].to    = 0;
-      (*ap)[1+1].score = -1;
+      (*ap)[i+1].score = -1;
     }
 
   printf("addArc done\n");


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1073424&group_id=8032



More information about the Glasgow-haskell-bugs mailing list