-
Notifications
You must be signed in to change notification settings - Fork 708
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
Remove all pointer casts in C code #151
Comments
See also #152. |
My current shortlist of what's left is:
The crypto/rand casts are only casting |
The cast listed above in crypto/bn/internal.h will take more time to resolve. This is the definition of |
The patches for removing these have been written but aren't committed yet, in case the BoringSSL team wants them to be adjusted:
Current shortlist:
Excluded because they are better than alternatives, AFAICT:
|
We've made a lot of progress that has replaced a lot of C code. Here's the updated list:
This code will be replaced as in #357. (It only affects 32-bit ARM Linux targets.)
This will get replaced as a side effect of improving the Montgomery math code.
These are
It would be straightforward to fix this by changing the type of typedef P256_POINT_AFFINE PRECOMP256_ROW[64]; Question: Is it guaranteed that
Basically, we need to write a function that, given |
Done. |
The current shortlist, which I got after grepping for “*)” and doing a bit of filtering, is below. All of them seem pretty easy to eliminate. However, it would be better to find a tool that finds such casts that is smarter than grep, that we can run as a pre-commit hook and that we can run during builds to verify we don't add any new casts, especially when we merge changes from other forks.
I will take a stab at eliminating these soon.
The text was updated successfully, but these errors were encountered: