mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-23 11:09:28 -05:00
Sync with a:FR (#75)
* AFR sync * AFR sync: CBMC * AFR sync: CBMC: remove .bak files * AFR sync: CBMC: more cleanup * Corrected CBMC proofs * Corrected CBMC patches * Corrected CBMC patches-1 * Corrected CBMC patches-2 * remove .bak files (3) Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
This commit is contained in:
parent
6557291e54
commit
cb7edd2323
99 changed files with 6475 additions and 4241 deletions
|
|
@ -1,11 +1,9 @@
|
|||
/* Standard includes. */
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "semphr.h"
|
||||
|
||||
/* FreeRTOS+TCP includes. */
|
||||
|
|
@ -13,52 +11,27 @@
|
|||
#include "FreeRTOS_Sockets.h"
|
||||
#include "FreeRTOS_IP_Private.h"
|
||||
#include "FreeRTOS_UDP_IP.h"
|
||||
#include "FreeRTOS_TCP_IP.h"
|
||||
#include "FreeRTOS_DHCP.h"
|
||||
#include "NetworkInterface.h"
|
||||
#include "NetworkBufferManagement.h"
|
||||
#include "FreeRTOS_ARP.h"
|
||||
#include "FreeRTOS_TCP_WIN.h"
|
||||
|
||||
// Used to model FreeRTOS_recvfrom returning an arbitrary buffer
|
||||
char read_buffer[BUFFER_SIZE];
|
||||
|
||||
/****************************************************************
|
||||
* Signature of function under test
|
||||
****************************************************************/
|
||||
|
||||
BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType );
|
||||
|
||||
// Stub
|
||||
int32_t FreeRTOS_recvfrom(
|
||||
Socket_t xSocket, void *pvBuffer, size_t xBufferLength,
|
||||
BaseType_t xFlags, struct freertos_sockaddr *pxSourceAddress,
|
||||
socklen_t *pxSourceAddressLength )
|
||||
/****************************************************************
|
||||
* The proof for FreeRTOS_gethostbyname.
|
||||
****************************************************************/
|
||||
|
||||
void harness()
|
||||
{
|
||||
__CPROVER_assert(xFlags & FREERTOS_ZERO_COPY, "I can only do ZERO_COPY");
|
||||
/* Omitting model of an unconstrained xDHCPData because xDHCPData is */
|
||||
/* the source of uninitialized data only on line 647 to set a */
|
||||
/* transaction id is an outgoing message */
|
||||
|
||||
// Choose buffer size
|
||||
size_t offset;
|
||||
size_t buffer_size = BUFFER_SIZE - offset;
|
||||
char *buffer = read_buffer + offset;
|
||||
__CPROVER_assume(offset <= BUFFER_SIZE);
|
||||
BaseType_t xExpectedMessageType;
|
||||
|
||||
// Choose buffer contents
|
||||
// __CPROVER_havoc_object may not interact well with simplifier
|
||||
char temporary[BUFFER_SIZE];
|
||||
memcpy(read_buffer, temporary, BUFFER_SIZE);
|
||||
|
||||
*((char **)pvBuffer) = buffer;
|
||||
return buffer_size;
|
||||
}
|
||||
|
||||
// Stub
|
||||
void FreeRTOS_ReleaseUDPPayloadBuffer( void *pvBuffer )
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
void harness() {
|
||||
// Omitting model of an unconstrained xDHCPData because xDHCPData is
|
||||
// the source of uninitialized data only on line 647 to set a
|
||||
// transaction id is an outgoing message
|
||||
|
||||
BaseType_t xExpectedMessageType;
|
||||
prvProcessDHCPReplies(xExpectedMessageType);
|
||||
prvProcessDHCPReplies( xExpectedMessageType );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue