stklos bug - STk_extended_apply() loop

From: Jonathan Berry <berryj_at_dimacs.rutgers.edu>
Date: Sun, 4 Feb 1996 18:31:31 -0500

Has anybody seen this before? The following starts an apparantely
infinite loop from STk_extended_apply, and eventually segfaults.
(stk 2.2, SunOs4.1.3)
thanks,
        Jon
------------------------------------------------------------------
;;;;;;;;;;;;;;;;;;;;;; dummy decl. similar to that of manual - inf. loop
;;;;;;;;;;;;;;;;;;;;;; starting from STk_extended_apply(), then segfault
(load "stklos")
(define-generic new-+)
(define-class <complex> () ())
(let ((+ +))
        (define-method new-+ ((a <real>) (b <real>)) (+ a b))
        (define-method new-+ ((a <complex>) (b <complex>)) 5)
        (define-method new-+ ((a <number>)) 1)
        (define-method new-+ () 0)
        (define-method new-+ args (new-+ (car args) (apply new-+ (cdr args)))))
(set! + new-+)
(define c (make <complex>))
(+ c c c c)
Received on Mon Feb 05 1996 - 00:33:32 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST