3 #ifndef __CPROVER_LIMITS_H_INCLUDED
5 # define __CPROVER_LIMITS_H_INCLUDED
20 #ifndef __CPROVER_LIMITS_H_INCLUDED
22 # define __CPROVER_LIMITS_H_INCLUDED
32 i != LONG_MIN,
"argument to labs must not be LONG_MIN");
38 #ifndef __CPROVER_LIMITS_H_INCLUDED
40 # define __CPROVER_LIMITS_H_INCLUDED
45 long long int llabs(
long long int i)
50 i != LLONG_MIN,
"argument to llabs must not be LLONG_MIN");
56 #ifndef __CPROVER_INTTYPES_H_INCLUDED
57 # include <inttypes.h>
58 # define __CPROVER_INTTYPES_H_INCLUDED
61 #ifndef __CPROVER_LIMITS_H_INCLUDED
63 # define __CPROVER_LIMITS_H_INCLUDED
73 i != INTMAX_MIN,
"argument to imaxabs must not be INTMAX_MIN");
146 void *
calloc(__CPROVER_size_t nmemb, __CPROVER_size_t size)
149 __CPROVER_size_t alloc_size;
174 "max allocation may fail");
192 #ifdef __CPROVER_STRING_ABSTRACTION
206 #ifndef LIBRARY_CHECK
212 inline void *
malloc(__CPROVER_size_t malloc_size)
239 "max allocation may fail");
255 #ifdef __CPROVER_STRING_ABSTRACTION
266 #ifndef LIBRARY_CHECK
284 #ifdef __CPROVER_STRING_ABSTRACTION
297 void *
alloca(__CPROVER_size_t alloca_size)
309 #ifndef LIBRARY_CHECK
313 #ifndef LIBRARY_CHECK
323 "free argument must be NULL or valid pointer");
325 "free argument must be dynamic object");
327 "free argument has offset zero");
337 "free called for new[] object");
342 "free called for stack-allocated object");
356 #ifndef __CPROVER_ERRNO_H_INCLUDED
358 #define __CPROVER_ERRNO_H_INCLUDED
361 #ifndef __CPROVER_LIMITS_H_INCLUDED
363 #define __CPROVER_LIMITS_H_INCLUDED
378 long strtol(
const char *nptr,
char **endptr,
int base)
381 #ifdef __CPROVER_STRING_ABSTRACTION
383 "zero-termination of argument of strtol");
386 if(base==1 || base<0 || base>36)
404 else if((base==0 || base==16) && !in_number &&
405 ch==
'0' && (nptr[i+1]==
'x' || nptr[i+1]==
'X'))
412 else if(base==0 && !in_number && ch==
'0')
418 else if(!in_number && !sign &&
isspace(ch))
420 else if(!in_number && !sign && (ch==
'-' || ch==
'+'))
425 else if(base>10 && ch>=
'a' && ch-
'a'<base-10)
427 else if(base>10 && ch>=
'A' && ch-
'A'<base-10)
432 base=base==0 ? 10 : base;
450 *endptr=(
char*)nptr+i;
463 long strtol(
const char *nptr,
char **endptr,
int base);
468 return (
int)
strtol(nptr, (
char **)0, 10);
476 long strtol(
const char *nptr,
char **endptr,
int base);
481 return strtol(nptr, (
char **)0, 10);
488 #ifndef __CPROVER_STDDEF_H_INCLUDED
490 # define __CPROVER_STDDEF_H_INCLUDED
501 #ifdef __CPROVER_STRING_ABSTRACTION
503 "zero-termination of argument of getenv");
506 #ifdef __CPROVER_CUSTOM_BITVECTOR_ANALYSIS
507 __CPROVER_event(
"invalidate_pointer",
"getenv_result");
510 return getenv_result;
525 buffer[buf_size-1]=0;
527 # ifdef __CPROVER_STRING_ABSTRACTION
539 void *
malloc(__CPROVER_size_t malloc_size);
540 void free(
void *ptr);
542 void *
realloc(
void *ptr, __CPROVER_size_t malloc_size)
547 "realloc argument is dynamic object");
551 return malloc(malloc_size);
575 void *
malloc(__CPROVER_size_t malloc_size);
577 void *
valloc(__CPROVER_size_t malloc_size)
583 return malloc(malloc_size);
588 #ifndef __CPROVER_ERRNO_H_INCLUDED
590 #define __CPROVER_ERRNO_H_INCLUDED
593 #undef posix_memalign
595 void *
malloc(__CPROVER_size_t malloc_size);
599 __CPROVER_size_t size)
603 __CPROVER_size_t multiplier =
alignment /
sizeof(
void *);
606 alignment %
sizeof(
void *) != 0 || ((multiplier) & (multiplier - 1)) != 0 ||
void * __CPROVER_allocate(__CPROVER_size_t size, __CPROVER_bool zero)
__CPROVER_thread_local __CPROVER_size_t __CPROVER_max_malloc_size
int __CPROVER_malloc_failure_mode
int __CPROVER_malloc_failure_mode_return_null
const void * __CPROVER_deallocated
const void * __CPROVER_memory_leak
__CPROVER_bool __CPROVER_malloc_may_fail
int __CPROVER_malloc_failure_mode_assert_then_assume
__CPROVER_bool __CPROVER_r_ok(const void *,...)
mp_integer alignment(const typet &type, const namespacet &ns)
int __VERIFIER_nondet_int(void)
void * realloc(void *ptr, __CPROVER_size_t malloc_size)
long atol(const char *nptr)
_Bool __builtin_mul_overflow()
long int labs(long int i)
int posix_memalign(void **ptr, __CPROVER_size_t alignment, __CPROVER_size_t size)
long strtol(const char *nptr, char **endptr, int base)
int rand_r(unsigned int *seed)
intmax_t __CPROVER_imaxabs(intmax_t)
void * calloc(__CPROVER_size_t nmemb, __CPROVER_size_t size)
void * malloc(__CPROVER_size_t malloc_size)
long int __builtin_labs(long int i)
void __CPROVER_deallocate(void *)
const void * __CPROVER_new_object
void * alloca(__CPROVER_size_t alloca_size)
__CPROVER_bool __VERIFIER_nondet___CPROVER_bool(void)
intmax_t imaxabs(intmax_t i)
_Bool __builtin_add_overflow()
long long int llabs(long long int i)
const void * __CPROVER_alloca_object
long long int __builtin_llabs(long long int i)
__CPROVER_bool __CPROVER_malloc_is_new_array
char * getenv(const char *name)
ptrdiff_t __VERIFIER_nondet_ptrdiff_t(void)
int atoi(const char *nptr)
void * __builtin_alloca(__CPROVER_size_t alloca_size)
long __VERIFIER_nondet_long(void)
void * valloc(__CPROVER_size_t malloc_size)