On Wed, Aug 15, 2012 at 1:48 PM, Stas Boukarev <
stas...@gmail.com> wrote:
> Mirko Vukovic <
mirko....@gmail.com> writes:
>> I am attaching output of
>> sh run-tests.sh 2>&1 > tests.out
>>
>> That command did not capture all of the messages (such as stack
>> restart options and backtraces). I don't know how to capture that.
> It contains everything I needed.
> So, the following test fails, as in the test itself fails
>
> (with-test (:name :bug-511072 :skipped-on '(not :sb-thread))
> (let* ((p (make-package :bug-511072))
> (sem (sb-thread:make-semaphore))
> (t2 (sb-thread:make-thread (lambda ()
> (handler-bind ((error (lambda (c)
> (sb-thread:signal-semaphore sem)
> (signal c))))
> (make-package :bug-511072))))))
> (sb-thread:wait-on-semaphore sem)
> (assert (eq 'cons (read-from-string "CL:CONS")))))
>
> It seems that the handler-bind takes no effect. I can't reproduce this.
> Can you run that form (sans with-test part) in a regular REPL?
>
>
> --
> With best regards, Stas.
>From the repl:
*********************************************************************
(let* ((p (make-package :bug-511072))
(sem (sb-thread:make-semaphore))
(t2 (sb-thread:make-thread (lambda ()
(handler-bind ((error (lambda (c)
(sb-thread:signal-semaphore sem)
(signal c))))
(make-package :bug-511072))))))
(sb-thread:wait-on-semaphore sem)
(assert (eq 'cons (read-from-string "CL:CONS"))))
; in:
; LET* ((P (MAKE-PACKAGE :BUG-511072)) (SEM (SB-THREAD:MAKE-SEMAPHORE))
; (T2
; (SB-THREAD:MAKE-THREAD
; (LAMBDA ()
; (HANDLER-BIND #
; #)))))
; (LET* ((P (MAKE-PACKAGE :BUG-511072))
; (SEM (SB-THREAD:MAKE-SEMAPHORE))
; (T2 (SB-THREAD:MAKE-THREAD (LAMBDA # #))))
; (SB-THREAD:WAIT-ON-SEMAPHORE SEM)
; (ASSERT (EQ 'CONS (READ-FROM-STRING "CL:CONS"))))
;
; caught STYLE-WARNING:
; The variable P is defined but never used.
;
; caught STYLE-WARNING:
; The variable T2 is defined but never used.
;
; compilation unit finished
; caught 2 STYLE-WARNING conditions
NIL
*
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD RUNNING {1002A0EC23}>:
A package named :BUG-511072 already exists
********************************************************************
I get the same error when I execute in 1.054 (which I installed as a
downloaded binary)
Mirko