[all-commits] [llvm/llvm-project] ee4325: Initialize output parameters
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Fri Jan 7 15:21:43 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ee43259cbce46a5b979f06710dcfe664473f6a8d
https://github.com/llvm/llvm-project/commit/ee43259cbce46a5b979f06710dcfe664473f6a8d
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2022-01-07 (Fri, 07 Jan 2022)
Changed paths:
M llvm/lib/Support/YAMLTraits.cpp
Log Message:
-----------
Initialize output parameters
If the function returns true, it should
set all output paremeters, similar to Output::preflightElement, or we
have UB on code like:
```
void *SaveInfo;
if (io.preflightFlowElement(i, SaveInfo))
io.postflightFlowElement(SaveInfo);
```
It's going to be detected by msan with:
-Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1
Differential Revision: https://reviews.llvm.org/D116826
Commit: 669eb60046706c096d4d7804359670f3ca18ed7a
https://github.com/llvm/llvm-project/commit/669eb60046706c096d4d7804359670f3ca18ed7a
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2022-01-07 (Fri, 07 Jan 2022)
Changed paths:
M clang-tools-extra/clangd/SemanticHighlighting.cpp
Log Message:
-----------
Initialize HighlightingsBuilder::Resolver
Detected by msan with:
-Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1
Differential Revision: https://reviews.llvm.org/D116828
Commit: 91cb471c4bd2db6260c9802c47e9f7344f2b3627
https://github.com/llvm/llvm-project/commit/91cb471c4bd2db6260c9802c47e9f7344f2b3627
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2022-01-07 (Fri, 07 Jan 2022)
Changed paths:
M llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h
Log Message:
-----------
Initialize fields of TypeRecord subclasses
Detected by msan with:
-Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1
Differential Revision: https://reviews.llvm.org/D116829
Commit: bd9ae596d8635e36391be22f7ed74f77fb2d0371
https://github.com/llvm/llvm-project/commit/bd9ae596d8635e36391be22f7ed74f77fb2d0371
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2022-01-07 (Fri, 07 Jan 2022)
Changed paths:
M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Log Message:
-----------
Initialize ExtAddrMode::Scale
Detected by msan with:
-Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1
Differential Revision: https://reviews.llvm.org/D116830
Commit: 5c46c1c23abb4a01f7f40bfcb8851cb893739e14
https://github.com/llvm/llvm-project/commit/5c46c1c23abb4a01f7f40bfcb8851cb893739e14
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2022-01-07 (Fri, 07 Jan 2022)
Changed paths:
M llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
Log Message:
-----------
Initialize output parameter
Or code like this have UB passing uninitialized CmpValue:
```
int64_t CmpMask, CmpValue;
if (!TII->analyzeCompare(MI, SrcReg, SrcReg2, CmpMask, CmpValue))
return false;
if (TII->optimizeCompareInstr(MI, SrcReg, SrcReg2, CmpMask, CmpValue, MRI)) {
```
Detected by msan with:
-Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1
Differential Revision: https://reviews.llvm.org/D116831
Compare: https://github.com/llvm/llvm-project/compare/ec2945d031b6...5c46c1c23abb
More information about the All-commits
mailing list