Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#918 closed defect (fixed)

Strange stack overflow in remove-if-not

Reported by: uchida Owned by: gb
Priority: normal Milestone:
Component: Compiler Version: 1.6
Keywords: x86 Cc:

Description (last modified by rme)

I think this is a compiler bug.

(defun test-func ()
;;  (declare (optimize (speed 0) (safety 2)))           ;-> success
  (declare (optimize (speed 0) (safety 3)))             ;-> error
  (dotimes (i 10000)
    (remove-if-not #'(lambda (e)
		       (eql i e))
		   '(a))))

(loop for i from 1 to 50000 do
     (format t "i=~A~%" i)
     (let ((t1 (ccl:process-run-function "t1" #'test-func))
	   (t2 (ccl:process-run-function "t2" #'test-func)))
       (ccl:join-process t1)
       (ccl:join-process t2)))

...
i=275
i=276
i=277
i=278
> > Error: Stack overflow on value stack.
> > While executing: CCL::LIST-DELETE-MODERATELY-COMPLEX, in process t2(557).

;;;
;;; #<PROCESS t2(557) [Active] #xC367F56> requires access to Shared
Terminal Input
;;; Type (:y 557) to yield control to this thread.
;;;

Change History (5)

comment:1 Changed 7 years ago by rme

  • Description modified (diff)

comment:2 Changed 7 years ago by uchida

  • Keywords x86 added

dx86cl64 seems fine. This is reproducible only on 32bit version.(I tested it on lx86cl, wx86cl and dx86cl).

comment:3 Changed 7 years ago by gb

  • Owner set to gb
  • Status changed from new to assigned

comment:4 Changed 7 years ago by gb

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [15259]) In !INIT-CLOSURE, don't set the closure's self-reference until after the self-reference table is initialized.

Fixes ticket:918 in the trunk.

comment:5 Changed 7 years ago by rme

Merged to 1.8 branch as r15260.

Merged to 1.7 branch as r15261.

Note: See TracTickets for help on using tickets.