#88 core dump using :rehash-size in 9nines

segfault
closed-fixed
clisp (525)
5
2002-06-14
2002-02-08
No

I downloaded the clisp_2.27-win32.zip win binary from
sourceforge.

The below program dumps core when using a rehash-size
of 21.0s0, whereas it works perfectly fine for 9.0s0,
or 10.0s0.

I obtain:
[7]> (ext:space (nines))
*** - Program stack overflow. RESET
and in a message box:
Die Ausnahme "unknown software exception" (0xc0000094)
ist .. Stelle 0x004e8ad0 aufgetreten.

The program is attached as a comment to the bug report
since comments are pre/tty-formatted, whereas this
message will be word-wrapped in sourceforge's
proportional font tracker window.

I suspect that something bad is causing the program
stack overflow, since I don't expect the tiny program,
which conses up 5MB when working, to cause that itself.

[3]> (ext:space (nines))
; using 9.0s0 for :rehash-size
Permanent
Temporary
Class instances
bytes instances bytes
----- ---------
--------- --------- ---------
RATIO 0
0 216630 3466080
SIMPLE-VECTOR 0
0 49 1872496
CONS 16
128 202 1616
BIGNUM 0
0 68 816
HASH-TABLE 0
0 10 520
----- ---------
--------- --------- ---------
Total 16
128 216959 5341528

Real time: 1.484 sec.
Run time: 1.484375 sec.
Space: 5353500 Bytes
GC: 9, GC time: 0.625 sec.
(450 2 450 1 450 4 450 13 4050 22 4050 33 36450 103
36450 195)

Discussion

  • Jörg Höhle

    Jörg Höhle - 2002-02-08

    Logged In: YES
    user_id=377168

    ;; Joerg Hoehles version: only positives: halves size and
    doubles speed
    ;; based on Bruce Hoult's posting to cll "Cute Little
    Problem"
    (defun nines ()
    (declare (optimize (speed 3) (safety 1)))
    (let ((nums (make-array 10
    :initial-contents (loop repeat 10 collect
    (make-hash-table :size 450
    :rehash-size 21.0s0)))))
    (setf (gethash 9 (svref nums 1)) t)
    (loop for n from 2 below 10 as h = (svref nums n) do;;
    start [*]
    (loop for p from 1 to (floor n 2) do
    (loop for a being the hash-keys of (svref
    nums p) do
    (loop for b being the hash-keys of
    (svref nums (- n p)) do
    (setf (gethash (+ a b) h) t
    (gethash (* a b) h) t
    (gethash (abs (- a b)) h)
    t)
    unless (zerop b) do (setf
    (gethash (/ a b) h) t)
    unless (zerop a) do (setf
    (gethash (/ b a) h) t))));; end [*]
    collect (hash-table-size h)
    collect ;; no format, just return result
    (loop for i from 1 unless (gethash i h) do
    (return i)))))

     
  • Sam Steingold

    Sam Steingold - 2002-02-19

    Logged In: YES
    user_id=5735

    I canot reproduce this with the current sources on linux.
    could you please try to debug this more?

     
  • Jörg Höhle

    Jörg Höhle - 2002-03-08

    Logged In: YES
    user_id=377168

    o MS-Windows-NT, -2000 and -95 crash. (clisp-2.27 and 2.28)
    No crashes occur on on:
    o Linux on both Intel and PPC
    o Solaris
    o Mac OS X

     
  • Jörg Höhle

    Jörg Höhle - 2002-04-16

    Logged In: YES
    user_id=377168

    Peter Burwood reports on the 13th of March 2002:
    > Basically, Clisp from CVS compiled with on Cygwin on
    Win98SE has
    > no problems with hash tables or Joerg's nines problem.

    cygwin compiles CLISP as with -DUNIX, not WIN32_NATIVE

     
  • Sam Steingold

    Sam Steingold - 2002-06-03

    Logged In: YES
    user_id=5735

    Okay, this is WIN32-specific, so I re-assign this to Arseny,
    our designated win32 guru!

     
  • Sam Steingold

    Sam Steingold - 2002-06-03
    • assigned_to: sds --> ampy
     
  • Sam Steingold

    Sam Steingold - 2002-06-14
    • status: open --> closed-fixed
     
  • Sam Steingold

    Sam Steingold - 2002-06-14

    Logged In: YES
    user_id=5735

    Arseny fixed this!

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks