Skip to content

Fix CBMC proofs for UDP#720

Merged
tony-josi-aws merged 10 commits intoFreeRTOS:dev/IPv6_integrationfrom
tony-josi-aws:fix_cbmc_proof_udp
Feb 21, 2023
Merged

Fix CBMC proofs for UDP#720
tony-josi-aws merged 10 commits intoFreeRTOS:dev/IPv6_integrationfrom
tony-josi-aws:fix_cbmc_proof_udp

Conversation

@tony-josi-aws
Copy link
Copy Markdown
Member

This PR fixes the build issues and proof failures for the UDP related CBMC proofs post the IPv6 changes.

Test Steps

cd test/cbmc/proofs/
python run-cbmc-proofs.py

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.

tony-josi-aws and others added 5 commits February 8, 2023 16:37
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>
@tony-josi-aws tony-josi-aws requested a review from a team as a code owner February 15, 2023 17:37
Comment thread source/FreeRTOS_UDP_IPv4.c Outdated
#endif /* if( ipconfigETHERNET_MINIMUM_PACKET_BYTES > 0 ) */
iptraceNETWORK_INTERFACE_OUTPUT( pxNetworkBuffer->xDataLength, pxNetworkBuffer->pucEthernetBuffer );
( void ) pxInterface->pfOutput( pxInterface, pxNetworkBuffer, pdTRUE );
if( pxInterface != NULL && pxInterface->pfOutput != NULL )
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use multiple parenthesis to separate different conditions and not rely on operator precedence.

Suggested change
if( pxInterface != NULL && pxInterface->pfOutput != NULL )
if( ( pxInterface != NULL ) &&
( pxInterface->pfOutput != NULL ) )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Comment on lines +95 to +97
pxNetworkEndPoints->pxNext = ( NetworkEndPoint_t * ) malloc( sizeof( NetworkEndPoint_t ) );
__CPROVER_assume( pxNetworkEndPoints->pxNext != NULL );
pxNetworkEndPoints->pxNext->pxNext = NULL;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us make this a bit more non-deterministic

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;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@tony-josi-aws tony-josi-aws merged commit 8f54d76 into FreeRTOS:dev/IPv6_integration Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants