Fix undefined behaviors caught by ubsan
This fixes a couple of integer overflows in parsing as well as removes the construction of a null reference that never got dereferenced. This also initializes the bool members in TCall Finally, this adds a UBSAN run alongside ASAN and TSAN in CI.
This commit is contained in:
parent
702026e3f5
commit
48eaea60b8
5 changed files with 14 additions and 5 deletions
|
|
@ -6059,7 +6059,7 @@ void HlslParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fn
|
|||
unaryArg = callNode.getAsUnaryNode()->getOperand();
|
||||
arg0 = unaryArg;
|
||||
}
|
||||
const TIntermSequence& aggArgs = *argp; // only valid when unaryArg is nullptr
|
||||
const TIntermSequence& aggArgs = argp ? *argp : TIntermSequence(); // only valid when unaryArg is nullptr
|
||||
|
||||
switch (callNode.getOp()) {
|
||||
case EOpTextureGather:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue