bug-guile
[Top][All Lists]
Advanced

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

Re: scm_num2dbl with #f -> segfault


From: Marius Vollmer
Subject: Re: scm_num2dbl with #f -> segfault
Date: 18 Oct 2002 23:37:14 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Bill Schottstaedt <address@hidden> writes:

> On the Sun (Solaris 2.9), guile 1.6.0, scm_num2dbl segfaults if
> accidentally passed #f instead of a number.

I can't reproduce this on GNU/Linux i386.  Could you try to figure out
why it crashes exactly?

I tried this:

    #include <libguile.h>
    #include <stdio.h>

    SCM
    xxx (SCM x)
    {
      printf ("%g\n", scm_num2dbl (x, "xxx"));
      return SCM_UNSPECIFIED;
    }

    int main ()
    {
      scm_init_guile ();
      scm_c_define_gsubr ("xxx", 1, 0, 0, xxx);
      scm_shell (0, NULL);
    }

    $ gcc -o x x.c -lguile
    $ ./x
    guile> (xxx #f)
    <unnamed port>:3:1: In procedure xxx in expression (xxx #f):
    <unnamed port>:3:1: Wrong type argument: #f
    ABORT: (wrong-type-arg)

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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