Skip to content

UnsupportedSpecializationException: Unexpected values provided for ContextObjectWriteNodeGen when creating Context instances manually #163

@LinqLover

Description

@LinqLover

Practical example to reproduce:

  • Install/get an image with SimulationStudio (for instance, the image from this bundle should do it)
  • Do it:
    Simulator evaluate: [1 + 2]
  • Expected behavior: Answers 3
  • Actual behavior: crash (UnsupportedSpecializationException: Unexpected values provided for ContextObjectWriteNodeGen)

Minimal example to debug:

  • Do it:
    thisContext privSender: Object new.
  • Expected behavior: A 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)
  • Actual behavior: VM crashes, same error as above

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 the Context interface. These objects are never actually interpreted by the VM, but the simulation protocol on Context can handle them like regular contexts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions