We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found that the definition for pushNewArrayBytecode generated by Druid does not manage a border case well.
pushNewArrayBytecode
This bytecode need to instantiate an array, so there is a check using the objectMemory getScavengeThreshold to check if the new object fits in the new space: https://github.com/pharo-project/pharo-vm/blob/eaa8ca205aa46fe79bd87dae2cb75244f67e743e/smalltalksrc/VMMaker/DruidJIT.class.st#L12691-L12695
objectMemory getScavengeThreshold
This happen because the check in the interpreter uses druidExitPoint instrinsic.
druidExitPoint
freeStart + numBytes > scavengeThreshold ifTrue: [ self druidExitPoint. needGCFlag ifFalse: [self scheduleScavenge]. self validateRoomInEdenOrDie: numBytes ].
But that intrinsic is implemented to work only with primitives:
druid/Druid/DRMetaCompilerIRGenerator.class.st
Lines 62 to 78 in 742b6c9
That is why it is jumping at the end of the definition (for primitives, it is the way to "fail" and execute the fallback).
druidForceIntepretation
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I found that the definition for
pushNewArrayBytecode
generated by Druid does not manage a border case well.This bytecode need to instantiate an array, so there is a check using the
objectMemory getScavengeThreshold
to check if the new object fits in the new space:https://github.com/pharo-project/pharo-vm/blob/eaa8ca205aa46fe79bd87dae2cb75244f67e743e/smalltalksrc/VMMaker/DruidJIT.class.st#L12691-L12695
The problem is that, after the comparison, there is a jump to the end of the bytecode in case of "not enough space".
This happen because the check in the interpreter uses
druidExitPoint
instrinsic.But that intrinsic is implemented to work only with primitives:
druid/Druid/DRMetaCompilerIRGenerator.class.st
Lines 62 to 78 in 742b6c9
That is why it is jumping at the end of the definition (for primitives, it is the way to "fail" and execute the fallback).
We need to merge
druidExitPoint
(for primitives) withdruidForceIntepretation
(for bytecodes).The text was updated successfully, but these errors were encountered: