This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[buildrobot] nds32: fix disassembler


My build robot found an out-of-range access to one of the array,
caused by two wrongly placed commans:

/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils_gdb/opcodes  -I. -I/home/jbglaw/repos/binutils_gdb/opcodes -I../bfd -I/home/jbglaw/repos/binutils_gdb/opcodes/../include -I/home/jbglaw/repos/binutils_gdb/opcodes/../bfd    -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT nds32-dis.lo -MD -MP -MF .deps/nds32-dis.Tpo -c -o nds32-dis.lo /home/jbglaw/repos/binutils_gdb/opcodes/nds32-dis.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils_gdb/opcodes -I. -I/home/jbglaw/repos/binutils_gdb/opcodes -I../bfd -I/home/jbglaw/repos/binutils_gdb/opcodes/../include -I/home/jbglaw/repos/binutils_gdb/opcodes/../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT nds32-dis.lo -MD -MP -MF .deps/nds32-dis.Tpo -c /home/jbglaw/repos/binutils_gdb/opcodes/nds32-dis.c -o nds32-dis.o
cc1: warnings being treated as errors
/home/jbglaw/repos/binutils_gdb/opcodes/nds32-dis.c: In function âprint_insn_nds32â:
/home/jbglaw/repos/binutils_gdb/opcodes/nds32-dis.c:352: error: array subscript is above array bounds
/home/jbglaw/repos/binutils_gdb/opcodes/nds32-dis.c:356: error: array subscript is above array bounds
make[3]: *** [nds32-dis.lo] Error 1


  This patch should fix it:

2013-12-13  Jan-Benedict Glaw  <>

	* nds32-dis.c (mnemonic_96): Fix typo.

diff --git a/opcodes/nds32-dis.c b/opcodes/nds32-dis.c
index f4bf779..e56a75b 100644
--- a/opcodes/nds32-dis.c
+++ b/opcodes/nds32-dis.c
@@ -228,9 +228,9 @@ print_insn16 (bfd_vma pc, disassemble_info *info, uint32_t insn)
     "addri36.sp", "lwi45.fe",  "lwi450",  "swi450",
     "0x1c",       "0x1d",      "0x1e",    "0x1f",
     "0x20",       "0x21",      "0x22",    "0x23",
-    "0x24",       "0x25",      "0x26",    "0x27,"
+    "0x24",       "0x25",      "0x26",    "0x27",
     "0x28",       "0x29",      "0x2a",    "0x2b",
-    "0x2c",       "0x2d",      "0x2e",    "0x2f,"
+    "0x2c",       "0x2d",      "0x2e",    "0x2f",
     "slts45",     "slt45",     "sltsi45", "slti45",
     "0x34",       "0x35",      "0x36",    "0x37",
     "0x38",       "0x39",      "0x3a",    "0x3b",



      Jan-Benedict Glaw              +49-172-7608481
Signature of:              Alles sollte so einfach wie mÃglich gemacht sein.
the second  :                          Aber nicht einfacher.  (Einstein)

Attachment: signature.asc
Description: Digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]