Fix build and proof failures for CBMC TCP proofs#710
Merged
tony-josi-aws merged 13 commits intoFreeRTOS:dev/IPv6_integrationfrom Feb 21, 2023
Merged
Fix build and proof failures for CBMC TCP proofs#710tony-josi-aws merged 13 commits intoFreeRTOS:dev/IPv6_integrationfrom
tony-josi-aws merged 13 commits intoFreeRTOS:dev/IPv6_integrationfrom
Conversation
Prior to this commit, CBMC would emit logging information in plain text format, which does not contain information required for the CBMC VSCode debugger. This commit makes CBMC use XML instead of plain text. Co-authored-by: Mark Tuttle <tuttle@acm.org>
| * more options left. | ||
| */ | ||
| static void prvReadSackOption( const uint8_t * const pucPtr, | ||
| _static void prvReadSackOption( const uint8_t * const pucPtr, |
Member
There was a problem hiding this comment.
I think we should stay away from this modification. There is a CBMC flag (--export-file-local-symbols) which exposes the internal static functions which should be used instead.
| pxSocket->u.xTCP.txStream = malloc( sizeof( StreamBuffer_t ) ); | ||
| __CPROVER_assume( pxSocket->u.xTCP.txStream != NULL ); | ||
| pxSocket->u.xTCP.pxPeerSocket = malloc( sizeof( FreeRTOS_Socket_t ) ); | ||
| __CPROVER_assume( pxSocket->u.xTCP.pxPeerSocket != NULL ); |
Member
There was a problem hiding this comment.
Why is this assumption being made here?
AniruddhaKanhere
approved these changes
Feb 21, 2023
Member
AniruddhaKanhere
left a comment
There was a problem hiding this comment.
Approved with reservation about comments.
| NetworkBufferDescriptor_t * pxNetworkBuffer = ensure_FreeRTOS_NetworkBuffer_is_allocated(); | ||
| size_t socketSize = sizeof( FreeRTOS_Socket_t ); | ||
| size_t bufferSize = sizeof( TCPPacket_t ); | ||
| /* Allocates min. buffer size required for the proof */ |
Member
There was a problem hiding this comment.
This comment just tells me what is written in the code right below.
Ideally, comments should answer questions like why does the proof need exactly sizeof( TCPPacket_t ) + uxIPHeaderSizeSocket( pxSocket ) and not just sizeof( TCPPacket_t ).
We could improve on these comments.
…lus-TCP into fix_cbmc_proof_tcp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the build issues and proof failures for the TCP CBMC proofs post the IPv6 changes.
Test Steps
Related Issue
Failing CBMC proofs
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.