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

Add a static analysis check for uninitialized reads #7

Open
rcgoodfellow opened this issue Sep 2, 2022 · 0 comments
Open

Add a static analysis check for uninitialized reads #7

rcgoodfellow opened this issue Sep 2, 2022 · 0 comments

Comments

@rcgoodfellow
Copy link
Collaborator

For context see this wiki entry.

https://github.com/oxidecomputer/p4/wiki/P4-Specification-Notes#reading-uninitialized-values

The P4 language design working group has stated that P4 is an unsafe language. So what I suggested as a better alternative in the wiki entry above will likely not be realized in the foreseeable future. However, we can try to detect these sorts of uses as much as possible at compile time.

rcgoodfellow added a commit that referenced this issue Sep 2, 2022
This currently causes a crash in x4c compiled code. A good question is
what should happen here. According to P4 spec x4c should emit an
unspecified value. According to ry we should apport the pipeline.

- #6

Perhaps we can catch some of these at compile time?

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

No branches or pull requests

1 participant