[gambit-list] Big number Bug?

dillo gimp dillogimp at gmail.com
Wed Apr 25 22:25:00 EDT 2007


On 4/26/07, Bradley Lucier <lucier at math.purdue.edu> wrote:
> I hope you don' t mind me CC'ing my reply to th list.
>
> On Apr 25, 2007, at 9:05 PM, dillo gimp wrote:
>
> >
> >
> > On 4/26/07, Bradley Lucier <lucier at math.purdue.edu> wrote:
> > On Apr 25, 2007, at 7:43 PM, dillo gimp wrote:
> >
> > > There might be a bug in big number handling,
> > > the same code runs fine under mzscheme and petite, but crashes with
> > > gambit :
> > > *** ERROR IN ##ratnum.* -- Divide by zero
> > > (quotient 0 0)
> > >
> > > I don't even use "quotient" in my code.
> >
> > We'd need to see a bit of your code to figure out what you *are*
> > using.
> >
> >
> > I don't know how to make gambit to report exactly where the code
> > has crashed.
> > The program is not exactly small either.
> > Can you tell me how to make gambit report "crash point"?
> > This is my compilation steps:
> >
> > cat /lfs/script/gambit.sh
> > #!/bin/bash
> > /usr/4.0b22/bin/gsc -prelude '(define (display x) (write x (current-
> > output-port)))' -link $1
> > prog=${1%.sc}
> > gcc -O2 -fomit-frame-pointer -freg-struct-return \
> >      -I/usr/4.0b22/include -L/usr/4.0b22/lib \
> >      -D___SINGLE_HOST -o $prog $prog.c ${prog}_.c -lgambc -lm -ldl -
> > lutil
>
> OK, well I still don't know what you're trying to do, but gambit
> requires gcc to use certain flags for to correctly compile gambit-
> generated code.  See the options in /usr/4.0b22/bin/
>

I don't understand. I am following the exact steps from:
http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html
http://www.iro.umontreal.ca/~gambit/doc/gambit-c_toc.html#TOC17

The program only reports:
*** ERROR IN ##ratnum.* -- Divide by zero
(quotient 0 0)

Without a more accurate location, I can't guess what's wrong.
The program is not big, but not small either, I can't cut and paste.

Most importantly: I don't use quotient in my code.
There shoudn't have any "divide by zero" code, else it would have
crashed with other scheme implementations.



More information about the Gambit-list mailing list