Segmentation fault in program
Sigbjorn Finne
sigbjorn_finne at hotmail.com
Mon Feb 12 15:06:53 EST 2001
I'm able to reproduce this here too -- forwarded
to glasgow-haskell-bugs; I'm no longer involved
debugging GHC bits.
--sigbjorn
----- Original Message -----
From: "T.J. Brown" <t_j_b_2 at yahoo.com>
To: "Sigbjorn Finne" <sigbjorn_finne at hotmail.com>
Sent: Monday, February 12, 2001 19:21
Subject: Re: Segmentation fault in program
> After making the changes suggested below and updating
> the GHC driver script to fix the -no-hs-main bug, my
> program will successfully complete when processing a
> small amount of data. When processing larger amounts
> of data, however, it will crash with a segmentation
> fault or print "EVACUATED object entered". If I
> increase the size of the heap with "+RTS -H<size>" the
> program will complete successfully. It doesn't seem
> like the garbage collector is doing the right thing.
> Is there something I need to do to enable the garbage
> collector to free memory between subsequent calls to
> the my Haskell function (Convert)?
>
> Thanks,
> T.J.
> --- Sigbjorn Finne <sigbjorn_finne at hotmail.com> wrote:
> > Hi,
> >
> > your converttst.c contains the following decl:
> >
> > extern void startupHaskell (int argc, char* argv[],
> > void* rootMod);
> > void* __init_Main;
> >
> > That won't work, as the root module argument needs
> > to point to
> > something valid. Rewrite it to:
> >
> > extern void startupHaskell (int argc, char* argv[],
> > void* rootMod);
> > extern void* __init_Convert;
> >
> > and substitute __init_Main with __init_Convert
> > wherever it is used
> > in the C code.
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
More information about the Glasgow-haskell-bugs
mailing list