Opened 10 years ago

Closed 10 years ago

#598 closed defect (fixed)

Crashes with external process semaphores

Reported by: gz Owned by: gb
Priority: critical Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:

Description

The following test will usually crash CCL within seconds with a malloc heap corruption.

Doesn't crash if I redefine %make-semaphore-ptr to not create a gcable pointer.

(defun run-env () 
  (with-output-to-string (out) 
    (let ((process (run-program "/bin/sh" (list "-c" "env") 
                                :wait t :output out))) 
      (when process 
        (multiple-value-bind (status code) 
            (external-process-status process) 
          (unless (and (eq status :exited) (zerop code)) 
            (error "Shell command failed"))))))) 
 
 
(list 
 (process-run-function "Worker 1" (lambda () (loop (run-env)))) 
 (process-run-function "Worker 2" (lambda () (loop (run-env)))) 
 (process-run-function "GC'er" (lambda () (loop (gc) (sleep (1+ (random 3))))))) 

Change History (2)

comment:1 Changed 10 years ago by gb

This should be fixed in r12798.

comment:2 Changed 10 years ago by gz

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.