-
Notifications
You must be signed in to change notification settings - Fork 6
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
Missing SPARK_Mode in generic Write procedures in tests #287
Comments
We should not just apply the quick fix. The generated SPARK code should be adapted so that the |
@treiher can you please take a look at the failing check? I can't reproduce the issue locally (also I don't understand why it would fail there). |
I already observed that issue on the develop branch yesterday. I will look into it. |
The issue seems to be gone (on develop as well as on this branch). After re-running the tests other issues are found which seem to be related to your changes: rflx-ipv4-tests.adb:320:07: medium: precondition might fail, cannot prove Field_Length (Ctx, F_Payload) mod 8 = 0 |
Fixed by #295. |
Multiple tests implement a generic
Write_Data
procedure to be used in generic set procedures for opaque fields:The assignment to
Buffer
cannot be proven since its length depends on the call and it has no precondition.The quick fix would be to enable
SPARK_Mode
and check for the length (and e.g. use a default value to initialize if the check fails).To actually prove the length the length of
Buffer
has to be a precondition toSet_*
andSet_Bounded_*
procedures.The text was updated successfully, but these errors were encountered: