chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segmentation Fault with IUP on chicken 5.2.0


From: Peter Bex
Subject: Re: Segmentation Fault with IUP on chicken 5.2.0
Date: Fri, 26 Feb 2021 08:02:00 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Feb 25, 2021 at 05:04:14PM -0700, Jeff Moon wrote:
> Any ideas what could be causing this, or what I could do to track
> it down?

Hi Jeff,

This sounds like there might be a bug at the toplevel of IUP, which
might explain why re-importing works (it shouldn't re-evaluate the
toplevel).

There are a few things you can do.

I would first simply run the program under gdb and see if you can track
down in which file and which C function it crashes.  Then, see which
function this corresponds to in the Scheme code.  You will need to
compile IUP with the -k option to keep the generated C sources
(try CSC_OPTIONS=-k on the chicken-install command line).

If that doesn't give you anything useful, you can try using a debugbuild
of CHICKEN.  This includes many extra runtime safety checks which may
cause an earlier crash via an assertion fail.  These checks are done at
the generated C level as well, so again you'll need to compile IUP and
anything related with -k.

To get a debugbuild, recompile CHICKEN itself with DEBUGBUILD=1, install
it somewhere else and then build IUP and your program, then run it.  If
it causes an assertion trigger it will crash with some message like this:

[panic] Low-level type assertion C_blockp((C_word)C_VAL1(C__PREV_TMPST.n1))=#t 
failed at library.c:48051 - execution terminated.

If this is still not useful enough, try running the program under gdb
and put a breakpoint on "usual_panic", then run it again.  This will
give you a stack trace, so hopefully you can tell by the flow of calls
where the program crashed.

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]