-
Notifications
You must be signed in to change notification settings - Fork 207
Fix CBMC proofs for socket #719
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
Fix CBMC proofs for socket #719
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 <[email protected]>
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | ||
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should try and make it more non deterministic.
| 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; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed all
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | ||
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); | ||
| pxNetworkEndPoints->pxNext->pxNext = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly here too
| 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; | |
| } |
| pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) ); | ||
| __CPROVER_assume( pxNetworkEndPoints->pxNext != NULL ); | ||
| pxNetworkEndPoints->pxNext->pxNext = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here similarly we should do this.
| __CPROVER_assume( pxSocket != FREERTOS_INVALID_SOCKET ); | ||
|
|
||
| pxSocket->pxUserWakeCallback = safeMalloc( sizeof( SocketWakeupCallback_t ) ); | ||
| pxSocket->pxUserWakeCallback = &SocketWakeupCallback_Stub; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pxSocket->pxUserWakeCallback = &SocketWakeupCallback_Stub; | |
| pxSocket->pxUserWakeCallback = SocketWakeupCallback_Stub; |
|
/bot run uncrustify |
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.