#455 BIGNUM failure

lisp error
closed-fixed
clisp (525)
5
2008-04-02
2008-03-29
No

Code to produce bug:
(setq lf 134477)
(with-open-file (out "result.lisp"
:direction :output :if-exists :supersede)
(with-standard-io-syntax
(format out "(EXT:! ~A)~%" lf)))

(EXT:SHELL "time clisp -c result.lisp")
(EXT:SHELL "time clisp result.fas")

NOTE!! (EXT:! 134477) in interactive mode, and *IN THE COMPILE* pass the test!!!!

The factorial of 134477 fits into BIGNUM just fine.
This also means (load) will fail on legal BIGNUMs

Discussion

  • Sam Steingold

    Sam Steingold - 2008-04-02

    Logged In: YES
    user_id=5735
    Originator: NO

    the error here is that the string which contains the 134477! is very long - clisp thinks that a valid bignum cannot be so long. it appears that clisp is too conservative here and the test can be relaxed because later there will be another check.

     
  • Sam Steingold

    Sam Steingold - 2008-04-02

    Logged In: YES
    user_id=5735
    Originator: NO

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold

    Sam Steingold - 2008-04-02

    Logged In: YES
    user_id=5735
    Originator: NO

    intread.d (DIGITS_to_I): drop leading 0s; be extra permissive in the
    initial length check, but perform an overflow check on each erg_len increment

     
  • Sam Steingold

    Sam Steingold - 2008-04-02
    • assigned_to: haible --> sds
    • status: open --> closed-fixed
     
  • Andrew Kroll

    Andrew Kroll - 2008-04-05

    Logged In: YES
    user_id=2049191
    Originator: YES

    You're Quite welcome. 8-)(

    I would have mentioned the bug months and months ago, but for some oddball reason, I could not manage to obtain an account... :-/

    I'll probably do more oddball things to clisp as tests soon 8-D

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks