int main()
{
  struct dummy *pd1 = get_dummy(), *pd2 = get_dummy();
  int i, *pa;
  if (pd1 != 0 && pd1 == pd2 && i >= 0 && i < 10) {
    pd2->array[i] = i;
    pa = &pd1->array[i];
    i = pd2->array[i] - 10;
    while (i <= *pa) {
      ++i;
    }
    if (!check(pd2, i)) {
      goto ERROR;
    }
  }

  return 0;

  ERROR: __VERIFIER_error();
  return 1;
}
int main()
{
  struct dummy *pd1 = get_dummy(), *pd2 = get_dummy();
  int i, *pa;
  if (pd1 != 0 && pd1 == pd2 && (*pd2).a > 0) {
    pa = &pd1->a;
    i = pd2->a - 10;
    while (i < *pa) {
      ++i;
    }
    if (!check(pd2, i)) {
      printf("ERROR!\n");
      assert_fail();
      goto ERROR;
    }
  }

  return 0;

  ERROR: __VERIFIER_error();
  return 1;
}
Example #3
0
int main()
{
  struct dummy *pd1 = get_dummy(), *pd2 = get_dummy();
  int i, *pa;
  if (pd1 != 0 && pd1 == pd2 && i >= 0 && i < 10) {
    pd2->array[i] = i;
    pa = &pd1->array[i];
    i = pd2->array[i] - 10;
    while (i < *pa) {
      ++i;
    }
    if (!check(pd2, i)) {
      printf("ERROR!\n");
      assert_fail();
      goto ERROR;
    }
  }

  return 0;

  ERROR:
  return 1;
}
char                    * build_chunk(ulong addr1, ulong addr2, int i)
{
    char                num[20];
    char                * buf = get_dummy();

    if (i != -1)
        {
            sprintf(num, "%d", i);
            memcpy(buf + NUM_OFF7, num, strlen(num));
        }
    *(int *) (buf + FAKECHUNK + CHUNK_SIZE) = SIZE_VALUE;
    *(int *) (buf + FAKECHUNK + CHUNK_FD) = SET_FD(addr1);
    *(int *) (buf + FAKECHUNK + CHUNK_BK) = SET_BK(addr2);
    return (buf);
}
int main() {
        int a, b; int c = 5; // The value of c is not important and may be arbitrary for this example
        a = __VERIFIER_nondet_int();
        b = __VERIFIER_nondet_int();
        int *pa, *pb; int *pc = &c;
        pa = pb = get_dummy();
        if (pc == 0 ||
            pa == pb && *pa != *pb) {
                goto ERROR;
        }

        return 0;

        ERROR: __VERIFIER_error();
        return 1;
}
void                    memcpy_flush(void)
{
    int                 i = 0, j;
    char                * buf;
    char                num[20];

    if (!cur_num)
        return;
    buf = get_dummy();
    for (i = 0; i != cur_num - 1; i++)
        {
            sprintf(buf, CVS_ISMOD"%s\n", DUMMY2);
            sprintf(num, "%d", i);
            memcpy(buf + CVS_ISMODSZ, num, strlen(num));
            for (j = 0; j != OVERFLOW_NUM; j++)
                nprintf(buf);
        }
    return;
}
Example #7
0
static gboolean
try_reenqueue_dummy (MonoLockFreeQueue *q)
{
	MonoLockFreeQueueDummy *dummy;

	if (q->has_dummy)
		return FALSE;

	dummy = get_dummy (q);
	if (!dummy)
		return FALSE;

	if (InterlockedCompareExchange (&q->has_dummy, 1, 0) != 0) {
		dummy->in_use = 0;
		return FALSE;
	}

	mono_lock_free_queue_enqueue (q, &dummy->node);

	return TRUE;
}
 explicit NodeLocationsForWays(TStoragePosIDs& storage_pos,
                               TStorageNegIDs& storage_neg = get_dummy()) :
     m_storage_pos(storage_pos),
     m_storage_neg(storage_neg) {
 }