akovalenko/sbcl-win32-threads — Issue #13: (1.0.54.100) - A thread example that can crash Win32 . . . 
Author: supergrade
Created: 2011-12-18 04:04:37+00:00
State: open

"Heap exhausted", even though the process isn't really using much ram (it crashes within a couple of minutes, and doesn't look to be leaking).

(defclass deflate-compressor ()
((input
:initarg :input
:accessor input)
(chains
:initarg :chains
:accessor chains)
(hashes
:initarg :hashes
:accessor hashes)
(octet-buffer
:initarg :octet-buffer
:accessor octet-buffer)
(literal-fun
:initarg :literal-fun
:accessor literal-fun)
(length-fun
:initarg :length-fun
:accessor length-fun)
(distance-fun
:initarg :distance-fun
:accessor distance-fun)
(byte-fun
:initarg :byte-fun
:accessor byte-fun)
(compress-fun
:initarg :compress-fun
:accessor compress-fun))
(:default-initargs
:input (make-array 65536 :element-type '(unsigned-byte 8))
:chains (make-array 65536
:element-type '(unsigned-byte 16)
:initial-element 0)
:hashes (make-array 8191
:element-type '(unsigned-byte 16)
:initial-element 0)

:octet-buffer nil))

(loop for i from 1 to 10 do
(sb-thread:make-thread
(lambda ()
(loop for j from 1 do
(make-instance 'deflate-compressor)))))