Showing error 1452

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


Source:

607   __const wchar_t *__restrict __pwcs, size_t __n)
608     __attribute__ ((__nothrow__ , __leaf__));
609
610extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
611extern int getsubopt (char **__restrict __optionp,
612        char *__const *__restrict __tokens,
613        char **__restrict __valuep)
614     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
615extern int getloadavg (double __loadavg[], int __nelem)
616     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
617
618void exit(int s) {
619 _EXIT: goto _EXIT;
620}
621typedef struct node {
622  int h;
623  struct node *n;
624} *List;
625int main() {
626  List t;
627  List p = 0;
628  while (__VERIFIER_nondet_int()) {
629    t = (List) malloc(sizeof(struct node));
630    if (t == 0) exit(1);
631    t->h = 1;
632    t->n = p;
633    p = t;
634  }
635  while (p!=0) {
636    if (p->h != 1) {
637 ERROR: goto ERROR;
638    }
639    p = p->n;
640  }
641}
Show full sources