svcomp_openbsd_cbzero_alloca.c

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:15.0
disk size 513 Bytes
downloadable true
type
attribute value
name no_type
processor id 1
description this is the default benchmark type for rejected benchmarks and benchmarks that are not associated with a type.
owning community none
loading contents
#include <stdlib.h>

extern int __VERIFIER_nondet_int(void);

/*
 * bzero -- vax movc5 instruction
 */
void
cbzero(void *b, size_t length)
{
	char *p;

	for (p = b; length--;)
		*p++ = '\0';
}

int main() {
  int length = __VERIFIER_nondet_int();
  int n = __VERIFIER_nondet_int();
  if (length < 1) {
      length = 1;
  }
  if (n < 1) {
      n = 1;
  }
  if (n > length) return 0;
  char* nondetArea = (char*) alloca(length * sizeof(char));
  cbzero(nondetArea, n);
  return 0;
}
popout

content may be truncated. 'popout' for larger text window.

actions get anonymous link download benchmark