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
|
|
@ -374,7 +374,7 @@ namespace {
|
|||
int op_div(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a / b; }
|
||||
int op_mod(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a % b; }
|
||||
int op_pos(int a) { return a; }
|
||||
int op_neg(int a) { return -a; }
|
||||
int op_neg(int a) { return a == INT_MIN ? INT_MIN : -a; }
|
||||
int op_cmpl(int a) { return ~a; }
|
||||
int op_not(int a) { return !a; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue