I am running into a bug where ext::purify gets a segmentation violation
depending on the amount
of stuff that needs to be purified.  In the real situation where this
happens, I am saving a core image
file.  If you pass the :purify t arg, the running lisp dumps core.  I
have duplicated what
I think is similar behavior in a simpler context -- I just cons up a
bunch of stuff and call purify.

I am using 19a (the 2003-12 release).  The problem also occurs in 18e.

Attached are
    - the simple program that demonstrates the problem and
    - a transcript of a session that shows the error

Help would be appreciated.

Thanks.

-bill-



-- Attached file included as plaintext by Listar --
-- File: purify-test.lisp

(in-package "CL-USER")


;;; test program that demonstrates purify getting a segmentation violation


;;;----------------------------------------------------------------------

(defparameter *block-size* 1024)

(defparameter *block-count* 30000)

(defvar *block-list* '())

;;;----------------------------------------------------------------------

(defun test ()
  (format t "Overall size: ~5,2f Mwords (~5,2f Mbytes)~%"
          (/ (* *block-size* *block-count*) (expt 2 20))
          (/ (* *block-size* *block-count* 4) (expt 2 20))) 

  (format t "~%Making blocks ...~%")
  (finish-output)
  (add-blocks *block-size* *block-count*)
  (format t "   ... blocks made.~%")

  (format t "~%Starting purify ...~%")
  (finish-output)
  (ext::purify)
  (format t "   ... purify completed~%"))

;;;----------------------------------------------------------------------

(defun add-blocks (size count)
  (dotimes (i count)
    (add-block size)))

(defun add-block (size)
  (push (make-array size :initial-element nil) *block-list*))

;;;----------------------------------------------------------------------





-- Attached file included as plaintext by Listar --
-- File: cmucl-19a-purify-bug.text

otwb-dev bbrew 147> /org/develop/reasoning/lisp/cmucl/ss2003-12/bin/lisp
CMU Common Lisp CVS snapshot 2003-12, running on otwb-dev
With core: 
/net/dlsun3004/private/projects/org/develop/CMUCL/ss2003_12/lib/cmucl/lib/lisp.core
Dumped on: Sun, 2003-11-30 06:00:03-08:00 on moria.users.earthlink.net
See <http://www.cons.org/cmucl/> for support information.
Loaded subsystems:
    Python 1.1, target UltraSparc/Solaris 7
    CLOS based on Gerd's PCL 2003/06/18 09:23:09
* (load (compile-file "/org/develop/reasoning/porting/purify-test.lisp"))

; Python version 1.1, VM version UltraSparc/Solaris 7 on 15 APR 04 09:09:09 am.
; Compiling: /projects/org/develop/reasoning/porting/purify-test.lisp 15 APR 04 
09:08:55 am

; Byte Compiling Top-Level Form: 
; Converted TEST.
; Compiling DEFUN TEST: 
; Converted ADD-BLOCKS.
; Compiling DEFUN ADD-BLOCKS: 
; Converted ADD-BLOCK.
; Compiling DEFUN ADD-BLOCK: 
; Byte Compiling Top-Level Form: 

; /org/develop/reasoning/porting/purify-test.sparcf written.
; Compilation finished in 0:00:00.

; Loading #p"/projects/org/develop/reasoning/porting/purify-test.sparcf".
T
* (test)
Overall size: 29.30 Mwords (117.19 Mbytes)

Making blocks ...
; [GC threshold exceeded with 12,015,944 bytes in use.  Commencing GC.]
; [GC completed with 11,341,536 bytes retained and 674,408 bytes freed.]
; [GC will next occur when at least 23,341,536 bytes are in use.]
; [GC threshold exceeded with 23,358,112 bytes in use.  Commencing GC.]
; [GC completed with 23,331,944 bytes retained and 26,168 bytes freed.]
; [GC will next occur when at least 35,331,944 bytes are in use.]
; [GC threshold exceeded with 35,348,520 bytes in use.  Commencing GC.]
; [GC completed with 35,323,968 bytes retained and 24,552 bytes freed.]
; [GC will next occur when at least 47,323,968 bytes are in use.]
; [GC threshold exceeded with 47,340,544 bytes in use.  Commencing GC.]
; [GC completed with 47,314,560 bytes retained and 25,984 bytes freed.]
; [GC will next occur when at least 59,314,560 bytes are in use.]
; [GC threshold exceeded with 59,331,136 bytes in use.  Commencing GC.]
; [GC completed with 59,306,584 bytes retained and 24,552 bytes freed.]
; [GC will next occur when at least 71,306,584 bytes are in use.]
; [GC threshold exceeded with 71,323,160 bytes in use.  Commencing GC.]
; [GC completed with 71,294,312 bytes retained and 28,848 bytes freed.]
; [GC will next occur when at least 83,294,312 bytes are in use.]
; [GC threshold exceeded with 83,310,888 bytes in use.  Commencing GC.]
; [GC completed with 83,286,336 bytes retained and 24,552 bytes freed.]
; [GC will next occur when at least 95,286,336 bytes are in use.]
; [GC threshold exceeded with 95,302,912 bytes in use.  Commencing GC.]
; [GC completed with 95,276,928 bytes retained and 25,984 bytes freed.]
; [GC will next occur when at least 107,276,928 bytes are in use.]
; [GC threshold exceeded with 107,293,504 bytes in use.  Commencing GC.]
; [GC completed with 107,268,952 bytes retained and 24,552 bytes freed.]
; [GC will next occur when at least 119,268,952 bytes are in use.]
; [GC threshold exceeded with 119,285,528 bytes in use.  Commencing GC.]
; [GC completed with 119,256,680 bytes retained and 28,848 bytes freed.]
; [GC will next occur when at least 131,256,680 bytes are in use.]
   ... blocks made.

Starting purify ...
[Doing purification: segv_handler: Real protection violation: 0x2bff8000



Error in function UNIX::SIGSEGV-HANDLER:  Segmentation Violation at #xEF671450.
   [Condition of type SIMPLE-ERROR]

Restarts:
  0: [ABORT] Return to Top-Level.

Debug  (type H for help)

(UNIX::SIGSEGV-HANDLER #<unused-arg>
                       #<unused-arg>
                       #.(SYSTEM:INT-SAP #xEFFFE5F0))
Source: Error finding source: 
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM:  Source file no longer exists:
  target:code/signal.lisp.
0] 


Reply via email to