facebook / facebook/infer

False Positive Uninitialized Value after infinite loop [C]

未关闭
#1,418 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
c false-positive
主要语言
OCaml
星标
15.7k
派生
2.1k
平均合并
19 小时 36 分钟
30 天内合并 PR
13

描述

Version: pre-compiled 1.1.0 (https://github.com/facebook/infer/releases/download/v1.1.0/infer-linux64-v1.1.0.tar.xz)
```
Infer version v1.1.0
Copyright 2009 - present Facebook. All Rights Reserved.
```

OS: Debian sid

```c
int foo(void) {
int i;
for (;;) {
i = 4;
if (i == 4)
break;
}

return i;
}
```

results in:

```
infer run -- gcc -c test.c
Capturing in make/cc mode...
Found 1 source file to analyze in infer-out
1/1 [################################################################################] 100% 21.385ms

test.c:9: error: Uninitialized Value
The value read from i was never initialized.
7. }
8.
9. return i;
^
10. }

Found 1 issue
Issue Type(ISSUED_TYPE_ID): #
Uninitialized Value(UNINITIALIZED_VALUE): 1
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。