False Positive Uninitialized Value after infinite loop [C]
- Lingua principale
- OCaml
- Stelle
- 15.7k
- Fork
- 2.1k
- Merge medio
- 19h 36m
- PR unite (30g)
- 13
Descrizione
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
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.