Skip to content

Replace From<Reply> with TryFrom<Reply> in impl_reply#85

Closed
robin-nitrokey wants to merge 1 commit into
trussed-dev:mainfrom
robin-nitrokey:reply-try-from
Closed

Replace From<Reply> with TryFrom<Reply> in impl_reply#85
robin-nitrokey wants to merge 1 commit into
trussed-dev:mainfrom
robin-nitrokey:reply-try-from

Conversation

@robin-nitrokey
Copy link
Copy Markdown
Member

Previously, we would just trigger undefined behavior (core::hint::unreachable_unchecked) if there was a mismatch between the request and reply types for a Trussed syscall. With this patch, we return an error instead.

Fixes #84

Previously, we would just trigger undefined behavior
(core::hint::unreachable_unchecked) if there was a mismatch between the
request and reply types for a Trussed syscall.  With this patch, we
return an error instead.

Fixes trussed-dev#84
@sosthene-nitrokey
Copy link
Copy Markdown
Contributor

I made PR that added trait to avoid confusion of replies and requests types with each other. See #86

@robin-nitrokey
Copy link
Copy Markdown
Member Author

See #86

@robin-nitrokey robin-nitrokey deleted the reply-try-from branch February 1, 2023 09:17
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.

Dangerous unsafe in impl_reply

2 participants