Showing error 2189

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: pthread/fib_bench_safe.i
Line in file: 658
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

628     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
629extern int pthread_atfork (void (*__prepare) (void),
630      void (*__parent) (void),
631      void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
632
633int i=1, j=1;
634void *
635t1(void* arg)
636{
637  int k = 0;
638  for (k = 0; k < 5; k++)
639    i+=j;
640  pthread_exit(((void *)0));
641}
642void *
643t2(void* arg)
644{
645  int k = 0;
646  for (k = 0; k < 5; k++)
647    j+=i;
648  pthread_exit(((void *)0));
649}
650int
651main(int argc, char **argv)
652{
653  pthread_t id1, id2;
654  pthread_create(&id1, ((void *)0), t1, ((void *)0));
655  pthread_create(&id2, ((void *)0), t2, ((void *)0));
656  if (i > 144 || j > 144) {
657    goto ERROR;
658    ERROR:
659      ;
660  }
661  return 0;
662}
Show full sources