Skip to content

Non-terminating recursive call before assertions in cs_tests/recur10.c #29

@taquangtrung

Description

@taquangtrung

Hi,

For this test case, the first recursive call to f() inside the body of f will be non-terminating.

So, I wonder if it is OK to check alias information after this call?
Such assertions will never be reached anyway.

// cs_tests/recur10.c

#include "aliascheck.h"
int **p,*x, y, z;

void f() {
  p = &x;
  if (1) {
    *p = &y;
	MUSTALIAS(x,&y);
    f();
    *p = &z;
	/// p doesn't point to x at the above line: although p's
	/// value changed by stmt "p=&x", the value flow can not
	/// reach "*p=&z" since it will flow into f() before
	/// "*p=&z" and connected with the entry of f(). So the
	/// store "*p=&z" can not be completed as p's pts is empty.
	NOALIAS(x,&z);
	NOALIAS(x,&y);
    f();
  }
}

int main()
{
    f();
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions