Bug in SBCL 1.0.10? - lisp

This is a discussion on Bug in SBCL 1.0.10? - lisp ; I'm running SBCL 1.0.10 via AquaMacs 1.2 and Slime 2.0 on Mac OS X 10.4.10. The code below (obfuscated solution to a Project Euler problem) causes Lisp to hang when compiling the function. If I run sbcl from the Terminal ...

+ Reply to Thread
Results 1 to 5 of 5

Bug in SBCL 1.0.10?

  1. Default Bug in SBCL 1.0.10?

    I'm running SBCL 1.0.10 via AquaMacs 1.2 and Slime 2.0 on Mac OS X
    10.4.10. The code below (obfuscated solution to a Project Euler
    problem) causes Lisp to hang when compiling the function. If I run sbcl
    from the Terminal app and paste the function at the prompt, sbcl hangs
    too. Before I send this to the sbcl developers, can anyone confirm?

    Minor changes cause the problem to disappear, but I can't correlate the
    changes to anything (e.g. change the last "15" to "1" and it compiles;
    change "(* n (+ n 1) bim)" to "(* n (+ n 1))" and it compiles).
    LispWorks has no problem with this code.

    (defun foo ( )
    (labels ((bar (baz bim)
    (let ((n (+ baz bim)))
    (* n (+ n 1) bim))))
    (let ((a (bar 1 1))
    (b (bar 1 5))
    (c (bar 1 15)))
    (- (+ a b) c))))


  2. Default Re: Bug in SBCL 1.0.10?

    (message (Hello 'Bob)
    (you :wrote n '(Fri, 9 Nov 2007 11:10:40 -0500))
    (

    BF> I'm running SBCL 1.0.10 via AquaMacs 1.2 and Slime 2.0 on Mac OS X
    BF> 10.4.10. The code below (obfuscated solution to a Project Euler
    BF> problem) causes Lisp to hang when compiling the function. If I run
    BF> sbcl from the Terminal app and paste the function at the prompt, sbcl
    BF> hangs too. Before I send this to the sbcl developers, can anyone
    BF> confirm?

    yup. if you press ctrl-c, you'll see stuff like this:

    167: (SB-KERNEL::SIMPLIFY-UNIONS
    (#<SB-KERNEL:NUMERIC-TYPE (INTEGER 180 180)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 360 360)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 108 108)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 600 600)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 1620 1620)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 192 192)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 300 300)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 720 720)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 132 132)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 330 330)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 810 810)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 138 138)> ...))
    168: (SB-KERNEL::%TYPE-UNION
    (#<SB-KERNEL:NUMERIC-TYPE (INTEGER 180 180)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 360 360)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 108 108)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 600 600)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 1620 1620)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 192 192)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 300 300)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 720 720)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 132 132)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 330 330)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 810 810)>
    #<SB-KERNEL:NUMERIC-TYPE (INTEGER 138 138)> ...))
    169: (SB-C::IR1-OPTIMIZE-COMBINATION
    #<SB-C::COMBINATION
    :FUN #<SB-C::REF :LEAF # {AD48569}>
    :ARGS (#<SB-C::COMBINATION :FUN # :ARGS # {AD48BF9}>
    #<SB-C::COMBINATION :FUN # :ARGS # {AD48EB9}>) {AD485A1}>)

    so it looks like SIMPLIFY-UNIONS is buggy

    )
    (With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
    "Hanging In The Balance Of Deceit And Blasphemy")



  3. Default Re: Bug in SBCL 1.0.10?

    Bob Felts <wrf3@stablecross.com> wrote:
    > I'm running SBCL 1.0.10 via AquaMacs 1.2 and Slime 2.0 on Mac OS X
    > 10.4.10. The code below (obfuscated solution to a Project Euler
    > problem) causes Lisp to hang when compiling the function. If I run sbcl
    > from the Terminal app and paste the function at the prompt, sbcl hangs
    > too. Before I send this to the sbcl developers, can anyone confirm?
    >
    > Minor changes cause the problem to disappear, but I can't correlate the
    > changes to anything (e.g. change the last "15" to "1" and it compiles;
    > change "(* n (+ n 1) bim)" to "(* n (+ n 1))" and it compiles).
    > LispWorks has no problem with this code.
    >
    > (defun foo ( )
    > (labels ((bar (baz bim)
    > (let ((n (+ baz bim)))
    > (* n (+ n 1) bim))))
    > (let ((a (bar 1 1))
    > (b (bar 1 5))
    > (c (bar 1 15)))
    > (- (+ a b) c))))
    >


    I tried it using sbcl-1.0.4 on Intel Core 2 Duo running 64-bit Gentoo
    Linux. Compilation finished after hour and half. So for me it
    is not hanging, just compilation is extremally slow. Given that
    the function is very simple it is still a bug...

    --
    Waldek Hebisch
    hebisch@math.uni.wroc.pl

  4. Default Re: Bug in SBCL 1.0.10?

    Bob Felts wrote:
    > I'm running SBCL 1.0.10 via AquaMacs 1.2 and Slime 2.0 on Mac OS X
    > 10.4.10. The code below (obfuscated solution to a Project Euler
    > problem) causes Lisp to hang when compiling the function. If I run sbcl
    > from the Terminal app and paste the function at the prompt, sbcl hangs
    > too. Before I send this to the sbcl developers, can anyone confirm?
    >
    > Minor changes cause the problem to disappear, but I can't correlate the
    > changes to anything (e.g. change the last "15" to "1" and it compiles;
    > change "(* n (+ n 1) bim)" to "(* n (+ n 1))" and it compiles).
    > LispWorks has no problem with this code.
    >
    > (defun foo ( )
    > (labels ((bar (baz bim)
    > (let ((n (+ baz bim)))
    > (* n (+ n 1) bim))))
    > (let ((a (bar 1 1))
    > (b (bar 1 5))
    > (c (bar 1 15)))
    > (- (+ a b) c))))
    >


    I'm getting this on Windows with SBCL 1.0.9 (Starting sbcl, and pasting
    the data in it)

    C:\>sbcl
    This is SBCL 1.0.9, an implementation of ANSI Common Lisp.
    More information about SBCL is available at <http://www.sbcl.org/>.

    SBCL is free software, provided as is, with absolutely no warranty.
    It is mostly in the public domain; some portions are provided under
    BSD-style licenses. See the CREDITS and COPYING files in the
    distribution for more information.

    This is experimental prerelease support for the Windows platform: use
    at your own risk. "Your Kitten of Death awaits!"
    * (defun foo ( )
    (labels ((bar (baz bim)
    (let ((n (+ baz bim)))
    (* n (+ n 1) bim))))
    (let ((a (bar 1 1))
    (b (bar 1 5))
    (c (bar 1 15)))
    (- (+ a b) c))))
    fatal error encountered in SBCL pid 4152:
    GC invariant lost, file "gencgc.c", line 832

    LDB monitor
    ldb>

  5. Default Re: Bug in SBCL 1.0.10?

    Bob Felts <wrf3@stablecross.com> wrote:
    +---------------
    | LispWorks has no problem with this code.
    +---------------

    Neither do CLISP or CMUCL: Both happily compile and run it:

    > (foo)


    -3864
    >



    -Rob

    -----
    Rob Warnock <rpw3@rpw3.org>
    627 26th Avenue <URL:http://rpw3.org/>
    San Mateo, CA 94403 (650)572-2607


+ Reply to Thread

Similar Threads

  1. what is up with the sbcl compiler?!?!
    By Application Development in forum lisp
    Replies: 4
    Last Post: 12-07-2007, 02:57 PM
  2. Cannot activate sbcl
    By Application Development in forum lisp
    Replies: 27
    Last Post: 11-10-2007, 11:24 PM
  3. gc bug is SBCL?
    By Application Development in forum lisp
    Replies: 3
    Last Post: 08-30-2007, 03:11 PM
  4. SBCL and SWI-Prolog
    By Application Development in forum lisp
    Replies: 1
    Last Post: 07-19-2007, 09:58 AM
  5. Announce: Qi 7.3 under SBCL is available
    By Application Development in forum Functional
    Replies: 3
    Last Post: 05-10-2007, 09:09 AM