aboutsummaryrefslogtreecommitdiff
path: root/opcodes/ChangeLog
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-10 23:22:10 +1030
committerAlan Modra <amodra@gmail.com>2019-12-11 11:38:24 +1030
commitc202f69e5130fed314afa079ce30abaad4d34991 (patch)
treec4e19f714b47d869d10de621416ebd7436d24ba6 /opcodes/ChangeLog
parent0ef562a4b5da6bc1f16b2ea801b228acafd033d8 (diff)
downloadgdb-c202f69e5130fed314afa079ce30abaad4d34991.zip
gdb-c202f69e5130fed314afa079ce30abaad4d34991.tar.gz
gdb-c202f69e5130fed314afa079ce30abaad4d34991.tar.bz2
ubsan: cris: signed integer overflow
This was the following in print_with_operands case 4: number = buffer[2] + buffer[3] * 256 + buffer[4] * 65536 + buffer[5] * 0x1000000; and buffer[5] * 0x1000000 can indeed overflow. So to fix this we need to use unsigned arithmetic where overflow semantics are specified. But number is a long, and the expression is int which will be sign extended to long. If we make the expression unsigned it will be zero extended. So make number an int32_t and rearrange a little for some of the places that need fixing. * cris-dis.c (print_with_operands): Avoid signed integer overflow when collecting bytes of a 32-bit integer.
Diffstat (limited to 'opcodes/ChangeLog')
-rw-r--r--opcodes/ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 57212f8..6b76f15 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,10 @@
2019-12-11 Alan Modra <amodra@gmail.com>
+ * cris-dis.c (print_with_operands): Avoid signed integer
+ overflow when collecting bytes of a 32-bit integer.
+
+2019-12-11 Alan Modra <amodra@gmail.com>
+
* cr16-dis.c (EXTRACT, SBM): Rewrite.
(cr16_match_opcode): Delete duplicate bcond test.