I’ve been triangulating a long-standing bug in the Pharo VM, which seems to have been fixed in Squeak. 1 to: 1000 do: [ :i | | string | Transcript show: 'Iteration '; show: i; cr. 1 timesRepeat: [ (string := String new: 1000 withAll: $a) reversed. ]. ]. reliably managed to trigger the bug. It manifested itself in a number of different ways. Early VMs just crashed, later Squeak ones work, Pharo ones show different results. http://www.mirandabanda.org/files/Cog/VM/ 2636 from 16 dec 2012 and earlier crash 2640 from 20 dec 2012 and later work. Does anyone remember what changed in that period? Stephan Eggermont https://pharo.fogbugz.com/default.asp?11130 |
Hi Stephan,
On Thu, Mar 27, 2014 at 1:09 PM, Stephan Eggermont <[hidden email]> wrote:
I fixed a bug with compact classes. i don't remember why that would break things like your snippet but that's the substantive change:
r2640 | eliot | 2012-12-20 12:39:20 -0800 (Thu, 20 Dec 2012) | 42 lines CogVM source as per VMMaker.oscog-eem.240. Back out of the wrong-headed attempt to give compact class indices
to long header objects in changeClassOf:to:, and comment why (markAndTrace: reuses header type bits and depends on compact class and size fields to reconstruct type bits after traverse).
Consequently fix isClassOfNonImm:equalTo:compactClassIndex: so it will still accept long-header objects that are instances of compact classes but don't have a compact class index.
Clean-up accesses to the compactClassesArray so that they go through the compactClassAt: where appropriate. Use the short-hand class determinators such as isInstanceOfClassFloat:
in place of the long-winded is:instanceOf:compactClassIndex:. Remove obsolete use of cCode: 'magnitude >> 32' in the integer conversion routines signed64BitIntegerFor: et al now that Slang
generates the correct cases for right-shift. Eliminate the compactClassTable accessor. CompactClasses and splOb: are both in scope in CogObjectRepresentationForSqueakV3. Override sweepPhase in NewObjectMemory and hence eliminate initializeFreeBlocksPreSweep. Fix off-by-one error in okayOop:. Make longPrintOop: print header type info.
Make allAccessibleObjectsOk answer a result. Don't inline loadInitialContext for gdb breakpointing convenience. Declare some constant variables as const in the Cogit.
Don't use SA_ONSTACK if NEED_SIGALTSTACK is 0. (default is 1, so this isn't a change, except for experimenting). Fix nscogbuild/unixbuild/HowToBuild (thanks Bob).
------------------------------------------------------------------------ r2639 | eliot | 2012-12-18 10:39:16 -0800 (Tue, 18 Dec 2012) | 5 lines Third time lucky. Fix bug in changeClass:from: so that if receiver has long
header and class is compact, receiver still gets compact class field set, not cleared. No matter what header an instance has, if its class is compact it should have the compact class index set.
------------------------------------------------------------------------ r2637 | eliot | 2012-12-17 11:51:15 -0800 (Mon, 17 Dec 2012) | 10 lines CogVM source as per VMMaker.oscog-eem.238
Restore ThreadedFFIPlugin wanting COGMTVM to be determined on command line. Probably broke in VMMaker.oscog-eem.218 Fix bug in changeClass:from: so that if receiver has long header and
class is compact, receiver still gets compact class field set, not cleared. No matter what header an instance has, if its class is compact it should have the compact class index set.
HTH -- best, Eliot
|
In reply to this post by Stephan Eggermont-3
Thanks, Eliot. That looks like a small enough set of changes. Now les t’s if they were all applied. Stephan |
Free forum by Nabble | Edit this page |