Bug#471927: tracing functions
Just for the record, the piece of code that seems to keep looping
forever is in the file ./build-tree/gnu-interp.c, which is
automatically generated in the building process
[...]
if (bytesToShift == 0) {
return 300000;
}
totalObjects = 0;
oop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);
while ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {
if (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {
totalObjects += 1;
/* begin adjustFieldsAndClassOf:by: */
if (bytesToShift == 0) {
goto l1;
}
fieldAddr = oop + (lastPointerOf(oop)); // This is gnu-interp.c:1826 !!!
while ((((usqInt) fieldAddr)) > (((usqInt) oop))) {
fieldOop = longAt(fieldAddr);
if (!((fieldOop & 1))) {
longAtput(fieldAddr, fieldOop + bytesToShift);
}
fieldAddr -= BYTES_PER_WORD;
}
if (((longAt(oop)) & TypeMask) != HeaderTypeShort) {
classHeader = longAt(oop - (BYTES_PER_WORD));
newClassOop = (classHeader & (ALL_BUT_TYPE_MASK)) + bytesToShift;
longAtput(oop - (BYTES_PER_WORD), newClassOop | (classHeader & TypeMask));
}
l1: /* end adjustFieldsAndClassOf:by: */;
}
[...]
Greetings,
Miry
Reply to: