Skip to content
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

prohibit send()-to-self #166

Closed
warner opened this issue May 15, 2019 · 1 comment
Closed

prohibit send()-to-self #166

warner opened this issue May 15, 2019 · 1 comment
Labels
SwingSet package: SwingSet

Comments

@warner
Copy link
Member

warner commented May 15, 2019

I made a mistake while working on some comms integration, and convinced a vat to send messages to itself. Specifically, by getting an "ingress" and "egress" backwards, the receiving comms vat did a syscall.send({type:'export',id},...). Normally vats only use send to target {type:'import'}, but in this case the kernel cheerfully translateded the vat-local export into a sending-vat-specific export, and put it on the run queue just like any other message. Eventually the message was delivered to dispatch.deliver() back into the same vat from which it originated.

This was kinda confusing, and I don't think there's a good reason for vats to use the kernel to call back into themselves. So for now I'm going to disable these calls, and have the kernel throw an exception if a vat tries to send() to one of their own exports. It's conceivable that this will become a sensible thing to do in the future, when we get the escalator schedulers in place, but even then I'm not sure it will make sense.

The specific check is added to src/kernel/vatManager.js, in doSend().

@warner
Copy link
Member Author

warner commented Dec 4, 2019

in the old repo. this was SwingSet issue 43

@warner warner transferred this issue from Agoric/SwingSet Dec 4, 2019
@warner warner added the SwingSet package: SwingSet label Dec 4, 2019
dckc pushed a commit to dckc/agoric-sdk that referenced this issue Dec 5, 2019
Move E() implementation to `@agoric/eventual-send`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SwingSet package: SwingSet
Projects
None yet
Development

No branches or pull requests

1 participant