summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2020-11-16 20:20:30 +0900
committerKOBAYASHI Shuji <[email protected]>2020-11-16 20:20:30 +0900
commit7c470e25b8f1e2308e47a3b49b5910e8115ab500 (patch)
tree100d68e888e109460de84cffc438c9c4a4bf4858 /include
parent8a6614d30e4d1d55f06de2ff77c528dfc6729ab5 (diff)
downloadmruby-7c470e25b8f1e2308e47a3b49b5910e8115ab500.tar.gz
mruby-7c470e25b8f1e2308e47a3b49b5910e8115ab500.zip
Avoid undefined behavior
### ASAN report (`MRB_INT32`) ```console $ bin/mruby -ve '-0x40000000' mruby 3.0.0preview (2020-10-16) 00001 NODE_SCOPE: 00001 NODE_BEGIN: 00001 NODE_NEGATE: 00001 NODE_INT 40000000 base 16 irep 0x6070000001e0 nregs=2 nlocals=1 pools=0 syms=0 reps=0 iseq=9 file: -e /mruby/src/codedump.c:173:49: runtime error: left shift of 49152 by 16 places cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /mruby/src/codedump.c:173:49 in 1 000 OP_LOADI32 R1 -1073741824 1 006 OP_RETURN R1 1 008 OP_STOP /mruby/src/vm.c:1138:7: runtime error: left shift of 49152 by 16 places cannot be represented in type 'mrb_int' (aka 'int') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /mruby/src/vm.c:1138:7 in ```
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions