svcomp_mult_array_alloca.c

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:15.0
disk size 488 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);

int main() {
  int i, j;
  int length = __VERIFIER_nondet_int();
  if (length < 1) length = 1;
  int fac = __VERIFIER_nondet_int();
  if (fac < 1) fac = 1;
  int *arr = alloca(length*sizeof(int));
  int *arr2 = alloca(fac*length*sizeof(int));
  if (!arr || !arr2) return 0;
  for (i=0; i<length; i++) {
    arr[i] = __VERIFIER_nondet_int();
  }
  for (j=0; j<length*fac; j++) {
    arr2[j] = arr[i % length];
  }
  return 0;
}
popout

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

actions get anonymous link download benchmark