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

Enforce object handle integrity when inserting into containers, fix #569 #928

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Jul 5, 2023

This isn't so much a "safety" issue as a confusion-of-users issue. We want to detect any malformed object handles (bad index, bad tags) as early as possible, so users don't have to diagnose late errors when a lookup finally traps.

Anyway, this makes it impossible to insert a malformed one into a container, and since containers are how you form argument lists to making calls, it implicitly confines malformed object handles to a single contract instance.

@graydon graydon requested a review from sisuresh as a code owner July 5, 2023 02:40
@graydon graydon requested a review from dmkozh July 5, 2023 02:40
@graydon graydon enabled auto-merge (squash) July 5, 2023 18:33
@graydon graydon merged commit 2f3a7f3 into main Jul 5, 2023
@graydon graydon deleted the bug-569-host-object-handle-integrity branch July 5, 2023 18:43
@@ -1974,6 +1992,8 @@ impl VmCallerEnv for Host {
t: StorageType,
f: Val,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check value integrity for the input flag f as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants