pharo-project / pharo-vm

This is the VM used by Pharo
http://pharo.org
Other
115 stars 71 forks source link

When patching JITed code after become of a class, the class index can look like a negative number #873

Open tesonep opened 21 hours ago

tesonep commented 21 hours ago

The classIndex that we read from the JITed code might be sign extended when encoding, so we need to guarantee that we bit mask it before using it and the correct types of the variables

guillep commented 21 hours ago

To me it looks strange. isValidClassTag: is written to assume that a correct 22bit index is passed as argument. So it's the caller's fault then:

(objectMemory isValidClassTag: (backEnd inlineCacheTagAt: mcpc asInteger))

We should make sure that inlineCacheTagAt: always returns a valid index.

tesonep commented 20 hours ago

It is true, I will change it, also I am writting a test