Fix AArch64 unintialized variable which can cause diagnostic failures.
authorTamar Christina <tamar.christina@arm.com>
Thu, 7 Jun 2018 10:53:13 +0000 (11:53 +0100)
committerTamar Christina <tamar.christina@arm.com>
Thu, 7 Jun 2018 10:54:11 +0000 (11:54 +0100)
This patch fixes an uninitialized memory issue that can under certain
circumstances turn an error into a warning because non_fatal was not initialised
in all cases.

Verified using valgrind.

gas/config/tc-aarch64.c

PR binutils/21446
* tc-aarch64.c (record_operand_error, record_operand_error_with_data):
  Initialize non_fatal.

gas/ChangeLog
gas/config/tc-aarch64.c

index 0beb5b5f3896f22060d821e6bc0db41cb617d77f..ac392b975471a1ff6fa46bc43d0bf4b4125b6d40 100644 (file)
@@ -1,3 +1,9 @@
+2018-06-08  Tamar Christina  <tamar.christina@arm.com>
+
+       PR binutils/21446
+       * tc-aarch64.c (record_operand_error, record_operand_error_with_data):
+         Initialize non_fatal.
+
 2018-06-06  Sameera Deshpande  <sameera.deshpande@linaro.org>
 
        * config/tc-aarch64.c (aarch64_cpus): Add support of ARMv8.4 in
index 1990cbebf9fdc70192552b0a60949c6ab2035717..47ca0c8a1bc56b50d033b07b868e8e00e4718f67 100644 (file)
@@ -4400,6 +4400,7 @@ record_operand_error (const aarch64_opcode *opcode, int idx,
   info.index = idx;
   info.kind = kind;
   info.error = error;
+  info.non_fatal = FALSE;
   record_operand_error_info (opcode, &info);
 }
 
@@ -4415,6 +4416,7 @@ record_operand_error_with_data (const aarch64_opcode *opcode, int idx,
   info.data[0] = extra_data[0];
   info.data[1] = extra_data[1];
   info.data[2] = extra_data[2];
+  info.non_fatal = FALSE;
   record_operand_error_info (opcode, &info);
 }
 
This page took 0.028265 seconds and 4 git commands to generate.