-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
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
UnsupportedSpecializationException
: Unexpected values provided for ContextObjectWriteNodeGen
when creating Context
instances manually
#163
Comments
Thanks for raising the issue! So far, TruffleSqueak is quite constrained as to what you can do with In this particular case, TruffleSqueak only allows setting the sender to another Lines 79 to 88 in a068eca
We should be able to allow arbitrary objects because the sender is maintained in the Truffle frame arguments: trufflesqueak/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/util/FrameAccess.java Lines 45 to 47 in a068eca
However, it makes me quite nervous that someone does this because you'll definitely run into very weird problems (or more likely a simple crash) when that sender is suddenly accessed for execution. |
Thank you for the feedback!
Couldn't this check be moved into the interpretation of the return instructions? E.g., the VM-side equivalent of I can only tell that the OSVM has survived all my attempts so far to install any invalid senders on the stack :D |
Yes, that should be possible. The reason things are as they are is because we tried to avoid/catch propagation of "invalid" state as early as possible. Of course, "invalid" stands for "unusual" here. ;)
Good! I wish we could say the same about TruffleSqueak...maybe some day! :) |
Practical example to reproduce:
3
UnsupportedSpecializationException
: Unexpected values provided forContextObjectWriteNodeGen
)Minimal example to debug:
cannotReturn:
is put on the stack (and subsequently, the current project is emergency-exited because the debugger cannot display the stack, but the VM keeps alive - see OSVM for reference)It would be nice if TruffleSqueak could be more robust with regard to unusual contexts - just like the OpenSmalltalk VM, which does not raise an error unless the interpreter actually attempts to return to an invalid sender on the context.
For some background: SimulationStudio is relying on the possibility to put arbitrary objects (subinstances of
Context
) on the stack to modify the behavior of the image-side simulator while reusing theContext
interface. These objects are never actually interpreted by the VM, but the simulation protocol onContext
can handle them like regular contexts.The text was updated successfully, but these errors were encountered: