google / google/zerocopy

`isValid` soundness hole?

Open
#3,087 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.6k
Forks
179
Avg merge
1d 19h
Merged PRs (30d)
29

Description

We model `isValid` by providing a default implementation of `isValid _ := True` which can be overridden when an explicit definition is provided in a Hermes annotation.

However, I *suspect* this means that, given `T` with a non-trivial `isValid`, `(T, U)` will still have a trivial `isValid` since we don't explicitly provide an implementation for tuples which recurses into fields. Presumably the same hole exists with other compound types.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.