lrsan icon indicating copy to clipboard operation
lrsan copied to clipboard

CriticalVar.cc line 1119: CV->users() or cvAddr->users()?

Open zhanggenex opened this issue 5 years ago • 0 comments

@kengiter Something is confusing me. in CriticalVar.cc line 1119, it should be CV->users() or cvAddr->users()?

Please checkout this test.c https://github.com/zhanggenex/mylr/blob/master/test.c and test.ll https://github.com/zhanggenex/mylr/blob/master/test.ll.

Since CV is %3 = load i32, i32* @x, align 4, so CV->users() will only return %4 = icmp sgt i32 %3, 2. In this situation, def-use chain in test.c cannot be built and bugs is not found.

However, cvAddr is @x = dso_local global i32 1, align 4, cvAddr->users() has%12 = load i32, i32* @x, align 4, store i32 %11, i32* @x, align 4, %6 = load i32, i32* @x, align 4 and %3 = load i32, i32* @x, align 4. And the program can execute correctly. So where could be the problem?

zhanggenex avatar Mar 14 '19 09:03 zhanggenex