[BUG]-adjustAllOopsBy adjusts if offset is zero?
John M McIntosh
johnmci at mac.com
Fri Jul 11 07:33:56 UTC 2003
> From: "Andreas Raab" <andreas.raab at g...>
> Date: Thu Jul 10, 2003 4:39 pm
> Subject:
>
> > adjustAllOopsBy: bytesToShift
> >
> > actually has a comment
> > "Note: Don't bypass this method even if bytesToShift is zero
> > until the RootBit problem has been fixed in the
> > appropriate places."
> > "bytesToShift = 0 ifTrue: [ ^ nil ]."
> >
> >
> > Does anyone know if it's been fixed?
>
> Don't think so. IIRC, then the problem was that image save assumes
> that no
> object is root but somewhere before we get to actually writing the
> bits the
> active context is marked root. If that isn't cleared when we load the
> image
> it can easily crash.
>
> Cheers,
> - Andreas
Right that leads to my second question.
a) Could we not check the header of oop for the ROOT bit, then only do
the
self longAt: oop put: (header bitAnd: AllButRootBit).
Thus saving a write cycle.
b) If bytesToShift is ZERO then do we really need to invoke
self adjustFieldsAndClassOf: oop by: bytesToShift.
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|