[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Additional structure tests added
From: |
Peter Wood |
Subject: |
Re: [Gcl-devel] Additional structure tests added |
Date: |
Thu, 2 Jan 2003 23:32:23 +0100 |
User-agent: |
Mutt/1.4i |
Hi, again ...
On Sun, Dec 29, 2002 at 07:47:09PM -0600, Paul F. Dietz wrote:
> I'm back from Christmas vacation. I've added some more structure tests.
> The test suite is now causing gcl to seg fault after catching an error
> (this is on x86 Linux):
<snip>
> Unrecoverable error: Segmentation violation..
> Aborted
>
In fact, its not even necessary to _run_ the tests to see this. Just
load the struct tests and try the following (it probably won't abort
your process, since you are not ignoring the error):
> (in-package :cl-test)
#<"CL-TEST" package>
CL-TEST> (find-class 'struct-test-21)
#<Structure-Class STRUCT-TEST-21 1047012310>
CL-TEST> (find-class 'struct-test-20)
#<Structure-Class STRUCT-TEST-20 1046544760>
CL-TEST> (find-class 'struct-test-23)
#<Structure-Class STRUCT-TEST-23 1046425370>
CL-TEST> (find-class 'struct-test-22)
Caught fatal error: memory may be damaged.
Fast links are on: do (si:use-fast-links nil) for debugging
Broken at FIND-CLASS. Type :H for Help.
1 (Abort) Return to top level.
[DBG]CL-TEST>> :bt
#0 FIND-CLASS
{symbol=struct-test-22,errorp=struct-test-22,loc2=nil,loc3=struct-test-22,loc4=:...}
[ihs=7]
#1 EVAL {loc0=nil,loc1=nil,loc2=nil,loc3=#<compiled-function find-class>}
[ihs=6]
#2 TOP-LEVEL
{loc0=nil,loc1=0,loc2=0,loc3=nil,loc4=nil,loc5=nil,loc6=nil,loc7="-0.1.0A",loc8=...}
[ihs=5]
#3 FUNCALL {loc0=#<compiled-function system:top-level>} [ihs=4]
[DBG]CL-TEST>>
The problem tests are 'struct-test-22/{13,14,17}.
PCL uses a hash-table pcl::*find-class* to store the class values of
keys (like 'struct-test-22). Something is going wrong with the
creation / and/or storage of the structure class for struct-test-22.
Look at this:
CL-TEST> (find-class 'struct-test-21)
#<Structure-Class STRUCT-TEST-21 >
CL-TEST> (gethash 'struct-test-22 pcl::*find-class*)
(NIL #<Interpreted-function :LAMBDA-BLOCK PCL::FUNCTION-RETURNING-NIL>)
T
CL-TEST> (gethash 'struct-test-21 pcl::*find-class*)
(#<Structure-Class STRUCT-TEST-21 >
#<compiled-closure PCL::|CL-TEST::STRUCT-TEST-21 class predicate|>)
T
(I am running these interpreted for debugging)
I can't yet see why precisely 'struct-test-22 is causing this. If it
was some memory thing I would expect it to be a bit more random. Yet
it is 100% predictable.
More later ...
Regards,
Peter.