Fix CBMC proofs for socket#719
Merged
tony-josi-aws merged 10 commits intoFreeRTOS:dev/IPv6_integrationfrom Feb 17, 2023
Merged
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>
AniruddhaKanhere
requested changes
Feb 15, 2023
Comment on lines
+55
to
+56
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | ||
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); |
Member
There was a problem hiding this comment.
We should try and make it more non deterministic.
Suggested change
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | |
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); | |
| if( nondet_bool() ) | |
| { | |
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | |
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); | |
| } | |
| else | |
| { | |
| pxNetworkEndPoints->pxNext = NULL; | |
| } |
Comment on lines
+53
to
+55
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | ||
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); | ||
| pxNetworkEndPoints->pxNext->pxNext = NULL; |
Member
There was a problem hiding this comment.
Similarly here too
Suggested change
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | |
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); | |
| pxNetworkEndPoints->pxNext->pxNext = NULL; | |
| if( nondet_bool() ) | |
| { | |
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | |
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); | |
| pxNetworkEndPoints->pxNext->pxNext = NULL; | |
| } | |
| else | |
| { | |
| pxNetworkEndPoints->pxNext = NULL; | |
| } |
Comment on lines
+53
to
+55
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | ||
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); | ||
| pxNetworkEndPoints->pxNext->pxNext = NULL; |
Member
There was a problem hiding this comment.
Here similarly we should do this.
| __CPROVER_assume( pxSocket != FREERTOS_INVALID_SOCKET ); | ||
|
|
||
| pxSocket->pxUserWakeCallback = safeMalloc( sizeof( SocketWakeupCallback_t ) ); | ||
| pxSocket->pxUserWakeCallback = &SocketWakeupCallback_Stub; |
Member
There was a problem hiding this comment.
Suggested change
| pxSocket->pxUserWakeCallback = &SocketWakeupCallback_Stub; | |
| pxSocket->pxUserWakeCallback = SocketWakeupCallback_Stub; |
AniruddhaKanhere
approved these changes
Feb 16, 2023
shubnil
approved these changes
Feb 17, 2023
Member
Author
|
/bot run uncrustify |
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 Socket related 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.