Skip to content

Commit

Permalink
Fix ASAN issue casting to uint32 (iree-org#13193)
Browse files Browse the repository at this point in the history
Internally, asan includes undefined behavior sanitizer. Some tests are
hitting this where it's casting a float which is out of the range for
uint32.
  • Loading branch information
vwbaker authored and NatashaKnk committed Jul 6, 2023
1 parent 5cae31d commit 056ac34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/src/iree/vm/bytecode/verifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,17 +523,17 @@ iree_status_t iree_vm_bytecode_function_verify(
pc += 4;
#define VM_VerifyConstI64(name) \
IREE_VM_VERIFY_PC_RANGE(pc + 8, max_pc); \
uint32_t name = OP_I64(0); \
uint64_t name = OP_I64(0); \
(void)(name); \
pc += 8;
#define VM_VerifyConstF32(name) \
IREE_VM_VERIFY_PC_RANGE(pc + 4, max_pc); \
uint32_t name = OP_F32(0); \
float name = OP_F32(0); \
(void)(name); \
pc += 4;
#define VM_VerifyConstF64(name) \
IREE_VM_VERIFY_PC_RANGE(pc + 8, max_pc); \
uint32_t name = OP_F64(0); \
double name = OP_F64(0); \
(void)(name); \
pc += 8;

Expand Down

0 comments on commit 056ac34

Please sign in to comment.