Skip to content

Commit 7fc9f12

Browse files
Serge Gueltontstellar
Serge Guelton
authored andcommitted
Merging r372281:
------------------------------------------------------------------------ r372281 | serge_sans_paille | 2019-09-18 17:54:40 -0700 (Wed, 18 Sep 2019) | 8 lines Initialize all fields in ABIArgInfo. Due to usage of an uninitialized fields, we end up with a Conditional jump or move depends on uninitialised value Fixes https://bugs.llvm.org/show_bug.cgi?id=40547 Commited on behalf of Martin Liska <mliska@suse.cz> ------------------------------------------------------------------------
1 parent 28f6aac commit 7fc9f12

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang/include/clang/CodeGen/CGFunctionInfo.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,12 @@ class ABIArgInfo {
109109
UnpaddedCoerceAndExpandType = T;
110110
}
111111

112-
ABIArgInfo(Kind K)
113-
: TheKind(K), PaddingInReg(false), InReg(false) {
114-
}
115-
116112
public:
117-
ABIArgInfo()
113+
ABIArgInfo(Kind K = Direct)
118114
: TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
119-
TheKind(Direct), PaddingInReg(false), InReg(false) {}
115+
TheKind(K), PaddingInReg(false), InAllocaSRet(false),
116+
IndirectByVal(false), IndirectRealign(false), SRetAfterThis(false),
117+
InReg(false), CanBeFlattened(false), SignExt(false) {}
120118

121119
static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
122120
llvm::Type *Padding = nullptr,

0 commit comments

Comments
 (0)