The primitive that supports Array and OrderedCollection >> copyFrom:to: (prim 817), contains an unsafe object allocation. There is a race condition that can result in a SEGV: if a scavenge is triggered by an object faulting into memory after the new object is allocated; the new object could be intialized to zero rather than OOP_NIL.
Replace the two references to primtive 817 in the base image,with code that creates a result object and then calls the replaceFromto:with:startingAt: primitive.
Filein the following as SystemUser:
method: Array copyFrom: startIndex to: stopIndex | resultSize result | resultSize := stopIndex - startIndex + 1 . resultSize < 1 ifTrue:[ ^ self class new ]. (result := self class new: resultSize ) replaceFrom: 1 to: resultSize with: self startingAt: startIndex . ^ result % method: OrderedCollection copyFrom: startIndex to: stopIndex | resultSize result | resultSize := stopIndex - startIndex + 1. resultSize < 1 ifTrue:[ ^ self class new ]. (result := self class new: resultSize ) replaceFrom: 1 to: resultSize with: self startingAt: startIndex . ^ result %
Last updated: 1/30/23