Skip to content

Commit 417c50a

Browse files
committed
fix(swingset): addEgress should cause an import/reachable refcount
`addEgress` was calling `setReachable` with the wrong value for `isImportFromComms`. When we add an egress, the kernel is exporting an object into comms, and comms is exporting that to the downstream machine. So the downstream machine is *importing* it from comms (which means the `isReachable` flag causes the `reachable` refcount to be increased, something that only happens on imports, not on the export). This caused the object being exported through `addEgress` to have a zero refcount. If/when the downstream machine ever dropped it, the refcount would go negative, causing an error. fixes #3483
1 parent f15974a commit 417c50a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/SwingSet/src/vats/comms/clist-xgress.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function makeIngressEgress(state, provideLocalForRemote) {
1616
const inboundRRef = makeRemoteSlot('object', true, remoteRefID);
1717
remote.addRemoteMapping(inboundRRef, loid);
1818
remote.skipRemoteObjectID(remoteRefID);
19-
const isImportFromComms = false; // bug 3483: this should be 'true'
19+
const isImportFromComms = true;
2020
remote.setReachable(loid, isImportFromComms);
2121

2222
// prettier-ignore

0 commit comments

Comments
 (0)