Ticket #279 (closed bug: None)

Opened 8 years ago

Last modified 43 years ago

Segfault during (FFI)malloc with ghci

Reported by: nobody Owned by: nobody
Priority: normal Milestone:
Component: None Version: 6.2.1
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

From: Tom Pledger <tkpledger@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

Attachments

bug.2.tgz Download (2.4 KB) - added by nobody 8 years ago.

Change History

Changed 8 years ago by nobody

Changed 8 years ago by spanne

  • status changed from assigned to closed
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");

Note: See TracTickets for help on using tickets.