Fix CBMC proof for DHCP#717
Merged
tony-josi-aws merged 23 commits intoFreeRTOS:dev/IPv6_integrationfrom Feb 22, 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>
| lBytes = FreeRTOS_recvfrom( xDHCPv4Socket, &( pucUDPPayload ), 0, FREERTOS_ZERO_COPY, NULL, NULL ); | ||
|
|
||
| if( lBytes > 0 ) | ||
| if( lBytes > 0 && pucUDPPayload != NULL ) |
Member
There was a problem hiding this comment.
Suggested change
| if( lBytes > 0 && pucUDPPayload != NULL ) | |
| if( ( lBytes > 0 ) && ( pucUDPPayload != NULL ) ) |
Member
Author
There was a problem hiding this comment.
Fixed all formatting issues
| } | ||
|
|
||
| FreeRTOS_ReleaseUDPPayloadBuffer( pucUDPPayload ); | ||
| if (pucUDPPayload != NULL) |
Member
There was a problem hiding this comment.
Suggested change
| if (pucUDPPayload != NULL) | |
| if( pucUDPPayload != NULL ) |
| pxEndPoint ); | ||
|
|
||
| if( pucUDPPayloadBuffer != NULL ) | ||
| if( xDHCPv4Socket != FREERTOS_INVALID_SOCKET && xDHCPv4Socket != NULL && pucUDPPayloadBuffer != NULL ) |
Member
There was a problem hiding this comment.
Suggested change
| if( xDHCPv4Socket != FREERTOS_INVALID_SOCKET && xDHCPv4Socket != NULL && pucUDPPayloadBuffer != NULL ) | |
| if( ( xDHCPv4Socket != FREERTOS_INVALID_SOCKET ) && | |
| ( xDHCPv4Socket != NULL ) && | |
| ( pucUDPPayloadBuffer != NULL ) ) |
| /* The packet was not successfully queued for sending and must be | ||
| * returned to the stack. */ | ||
| FreeRTOS_ReleaseUDPPayloadBuffer( pucUDPPayloadBuffer ); | ||
| if (pucUDPPayloadBuffer != NULL) |
Member
There was a problem hiding this comment.
Suggested change
| if (pucUDPPayloadBuffer != NULL) | |
| if( pucUDPPayloadBuffer != NULL ) |
| pxEndPoint ); | ||
|
|
||
| if( pucUDPPayloadBuffer != NULL ) | ||
| if( xDHCPv4Socket != FREERTOS_INVALID_SOCKET && xDHCPv4Socket != NULL && pucUDPPayloadBuffer != NULL ) |
Member
There was a problem hiding this comment.
Suggested change
| if( xDHCPv4Socket != FREERTOS_INVALID_SOCKET && xDHCPv4Socket != NULL && pucUDPPayloadBuffer != NULL ) | |
| if( ( xDHCPv4Socket != FREERTOS_INVALID_SOCKET ) && | |
| ( xDHCPv4Socket != NULL ) && | |
| ( pucUDPPayloadBuffer != NULL ) ) |
| /* The packet was not successfully queued for sending and must be | ||
| * returned to the stack. */ | ||
| FreeRTOS_ReleaseUDPPayloadBuffer( pucUDPPayloadBuffer ); | ||
| if (pucUDPPayloadBuffer != NULL) |
Member
There was a problem hiding this comment.
Suggested change
| if (pucUDPPayloadBuffer != NULL) | |
| if( pucUDPPayloadBuffer != NULL ) |
| size_t uxAddressLength, | ||
| BaseType_t xInternal ) | ||
| { | ||
| return 0; |
Member
There was a problem hiding this comment.
Do we want to verify the pointers being valid?
| { | ||
| const char * name; | ||
|
|
||
| name = "hostname"; |
Member
There was a problem hiding this comment.
Why not make if non-deterministic too?
uint8_t size_of_hostname;
name = malloc( size_of_hostname );
| BaseType_t xReset; | ||
| eDHCPState_t eExpectedState; | ||
| BaseType_t xDoCheck; | ||
| //eDHCPState_t eExpectedState; |
Comment on lines
+138
to
+140
| #ifndef ipconfigDHCP_REGISTER_HOSTNAME | ||
| #define ipconfigDHCP_REGISTER_HOSTNAME 1 | ||
| #endif |
AniruddhaKanhere
approved these changes
Feb 22, 2023
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 DHCP 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.