inline void* Alloc( const std::size_t size ) { std::size_t bytes = size; if ( bytes == 0 ) { bytes = 1; } void* storage = alloc_16( bytes ); while ( storage == nullptr ) { std::new_handler handler = std::get_new_handler(); if ( handler == nullptr ) { return nullptr; } handler(); storage = alloc_16( bytes ); } return storage; }
void entry_point(void) { int condition = __VERIFIER_nondet_int(); struct A16 *p = alloc_16(condition); free_16(p, condition); }
void entry_point(void) { int condition = __VERIFIER_nondet_int(); struct A16 *p = alloc_16(condition); //unsafe: forgot to free }