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

Test that a malicious user can't shadow items in our derive-generated code #1684

Open
joshlf opened this issue Sep 19, 2024 · 0 comments
Open
Labels
experience-hard This issue is hard, and requires a lot of experience help wanted Extra attention is needed

Comments

@joshlf
Copy link
Member

joshlf commented Sep 19, 2024

Our custom derives sometimes emit code which generates its own internal items. They are designed so that the emitted items will shadow any items defined in the user's code, and thus those outer items can't affect the semantics of our emitted code.

However, we should explicitly test for this. In particular, for every item which is generated by our derives, we should add a test in zerocopy-derive/tests which defines items of the same names and confirms that a) compilation succeeds and that, b) the derives are still correct. Determining "correctness" is hard and may differ on a case-by-case basis.

@joshlf joshlf added help wanted Extra attention is needed experience-medium This issue is of medium difficulty, and requires some experience experience-hard This issue is hard, and requires a lot of experience and removed experience-medium This issue is of medium difficulty, and requires some experience labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experience-hard This issue is hard, and requires a lot of experience help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant