예제 #1
0
파일: test.c 프로젝트: GaloisInc/saw-script
int lt_after_stack_free()
{
  int * x = leak_pointer();
  int * y = leak_pointer();
  if( test_lt( x, y ) ) { puts("LT!"); }
  return 1;
}
예제 #2
0
파일: test.c 프로젝트: GaloisInc/saw-script
int le_after_free()
{
  volatile char* x = malloc(32);
  volatile char* y = x + 5;
  free((void*) x);
  if( test_lt( (void*) x, (void*) y ) ) { puts("LT!"); }
  return 1;
}
예제 #3
0
파일: test.c 프로젝트: GaloisInc/saw-script
int le_different_allocs()
{
  volatile int* x = malloc(sizeof(int));
  volatile int* y = malloc(sizeof(int));
  *x = 12;
  *y = 32;
  if( test_lt( (void*) x, (void*) y ) ) { puts("LT!"); }
  return 1;
}
예제 #4
0
static int
run_test (int /*argc*/, char* /*argv*/ [])
{
    test_eq ();
    test_lt ();

    //test_ne ();
    //test_gt ();
    //test_le ();
    //test_ge ();

    return 0;
}
예제 #5
0
int main()
{
  __float128 a = 0.0;
  __float128 b = 1.0;

  int r;

  r = test_lt (a, b);
  if (r != ((double) a < (double) b))
    abort();

  r = test_gt (a, b);
  if (r != ((double) a > (double) b))
    abort();

  return 0;
}