OSDN Git Service

Add UBSAN build option and fix undefined behaviour errors.
authorAndrew Scull <ascull@google.com>
Wed, 9 Sep 2015 22:50:42 +0000 (15:50 -0700)
committerAndrew Scull <ascull@google.com>
Wed, 9 Sep 2015 22:50:42 +0000 (15:50 -0700)
commit6ef7949448bbe3fdb1a0cf3dcbd32fd46c4baf9d
tree0042ae08e171a0438956817d067d05e3b72bd3d1
parent2c688f62f53fcf719bacce32ca615a582ce5c40b
Add UBSAN build option and fix undefined behaviour errors.

1. The assembler tried to write to unaligned addresses but memcpy fixes this.
2. The InstKind and OperandKind enums allowed target specific kinds that did not
   fall in the defined range. Defining the maximum target kind in the enum sorts
   this problem.

BUG=
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/1311653003 .
Makefile.standalone
src/IceAssembler.h
src/IceConverter.cpp
src/IceInst.h
src/IceOperand.h
src/IceRNG.cpp