aboutsummaryrefslogtreecommitdiff
path: root/zlib/test/example.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-10 18:12:28 +1030
committerAlan Modra <amodra@gmail.com>2019-12-11 11:35:14 +1030
commit567607c11fbf710513d0924192f3ed528c02d76f (patch)
tree969ff4eb4e3469519fd3926368b158c38cdb45e2 /zlib/test/example.c
parentb8e61daa1ad56330fd8931c8a53bfa16d8e4a47a (diff)
downloadgdb-567607c11fbf710513d0924192f3ed528c02d76f.zip
gdb-567607c11fbf710513d0924192f3ed528c02d76f.tar.gz
gdb-567607c11fbf710513d0924192f3ed528c02d76f.tar.bz2
ubsan: xtensa: left shift cannot be represented in type 'int'
In Operand_soffsetx4_decode: soffsetx4_0 = 0x4 + ((((int) offset_0 << 14) >> 14) << 2); and other places. Don't sign extend with shifts! This file also has many occurrences of truncation via shifts, which aren't a problem due to using uint32, but I dislike on principle enough to fix. * xtensa-modules.c (Field_* functions): Don't mask using shifts. (Operand_soffsetx4_decode, Operand_simm4_decode), (Operand_simm8_decode, Operand_simm8x256_decode), (Operand_simm12b_decode, Operand_label8_decode), (Operand_label12_decode, Operand_soffset_decode), (Operand_xt_wbr15_label_decode, Operand_xt_wbr18_label_decode): Don't sign extend using shifts. (Operand_immrx4_decode, Operand_uimm16x4_decode): Avoid UB in constant.
Diffstat (limited to 'zlib/test/example.c')
0 files changed, 0 insertions, 0 deletions