-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enforce that buildRootObject() returns an ephemeral, not durable
We assign the special "o+0" vref to the root object. Newly created virtual/durable objects are assigned a vref like "o+d13/5", which incorporates the KindID and the instance sequence number. If buildRootObject() were to create a virtual/durable object and return it as the root, we would now have one object with two different identities, violating the main slotToVal/valToSlot invariant. Under the new/upcoming VOM implementation, the initial Representative will have a context and a state that was created and cached under the durable vref, but by the time a method is called, valToSlot knows it as "o+0", so the vatstoreGet state lookup fails (as of course there is no state stored under "o+0"). (Under the old/current VOM, this sometimes worked by accident, but we believe there were cases where it would have failed) This commit inserts a liveslots check to ensure that the root object does not already have a vref. The documentation is updated to remind userspace vat authors of the constraint: `buildRootObject` must return an ephemeral, as created with `Far` or `makeExo`. It also changes vattp to use an ephemeral root. Fortunately, this was the only case we could find of an existing vat using a durable root. closes #7240
- Loading branch information
Showing
5 changed files
with
21 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters