gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] more on evenp bug


From: Lou Glassy
Subject: Re: [Gcl-devel] more on evenp bug
Date: Fri, 08 Mar 2002 11:50:07 -0700

[...stuff deleted...]
   > My host is a Debian GNU/Linux 2.2 system (Intel Celeron cpu).
   > 

   Good to see your choice of OS :-)

Yeah, it's a rock-solid platform.  I'm very pleased with it.

   > Looking through the source code, it looks like something
   > is happening in gcl/o/num_pred.c, in the function number_evenp().
   > Somehow when we exceed 32 bits in size (is this when we switch from 
   > using fixnums to bignums?), something goes berzerk.

   Yes, I concur.  I looked at this a few days ago, at it appears that
   the code is there to handle the bignums, but the *reader* is not
   detecting a bignum from the input string, and is truncating to an
   integer.  

   You seem to know a bit about lisp.  Is there anything like a C "type
   cast" which can force an item to be stored as a bignum?  I doubt it
   actually.  

As best I know, the distinction between a fixnum and a bignum is not
really made in the Lisp language itself.  To Lisp, it's turtles all 
the way down -- there is a COERCE function, but it doesn't seem to 
do what you're thinking of.

   OK, the best thing is to compile with -g, run under gdb, break at
   number_evenp, do a backtrace "bt", and see where the input was
   generated and how the lisp object was setup as a fixnum.  I'll try to
   do this when I get time, but if you are in a hurry, this is the way
   I'd go.

I'll have a go at this, this weekend.  Thanks for the ideas.  In the 
meantime, I have a workaround for my code - it'll be interesting to 
see how this bug happens, since GCL 2.2.1 seems not to have this problem.
"Something has changed in The Matrix..."  :-)

Thanks

Lou (address@hidden)






reply via email to

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