[squeak-dev] New LRUCache causing core dump
Chris Muller
ma.chris.m at gmail.com
Sun Feb 2 17:29:36 UTC 2014
Hi Levente, the new structure of LRUCache seems to expose a problem
with chasing pointers. When I try to chase pointers to any object,
one of the LRUCache's
I'm still digging to try and see whether its a bug with chasing
pointers or just a stack-depth limitation. What I see so far is that
PointerFinder wants to ask whether the 'head' var of the new LRUCache
#isLiteral. That is what leads to the VM crash.
(LRUCache allInstances anyOne instVarNamed: 'head') isLiteral
I noticed the 'head' var is initialized as a two-element Array, with
each element being the array itself. So trying to ask an Array
#isLiteral won't work in that case, e.g.,
|a| a:=Array new: 1.
a at: 1 put: a.
a isLiteral
causes the same issue.
Clearly, we cannot release with a broke PointerFinder. So, what's the
best fix folks? My first reaction is a guard in Array>>#isLiteral?
isLiteral
^ self class == Array and: [ (self includes: self) not and:
[ self allSatisfy: [ : each | each isLiteral ] ] ]
Thanks.
More information about the Squeak-dev
mailing list
|