aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2017-11-03 16:07:23 +0100
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2017-11-03 16:07:23 +0100
commit67fa57cfa536cefb5ae7cc4635db66d03fdbd8bb (patch)
tree640dda9e9661138ce5f35d577bf7e448372ec7ac
parentfdddd2900f39584e7d6cee27127593fba2cb0cf2 (diff)
downloadgdb-67fa57cfa536cefb5ae7cc4635db66d03fdbd8bb.zip
gdb-67fa57cfa536cefb5ae7cc4635db66d03fdbd8bb.tar.gz
gdb-67fa57cfa536cefb5ae7cc4635db66d03fdbd8bb.tar.bz2
Fix regression on ARM after Target FP patches
Commit edd079d9f6ca2f9ad21322b742269aec5de61190 exposed a pre-existing bug in convert_doublest_to_floatformat. In the specific case of converting a zero value to a floatformat using a "special" byteorder (i.e. neither floatformat_little nor floatformat_big), the output buffer was actually left uninitialized. gdb/ChangeLog: 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com> * doublest.c (convert_doublest_to_floatformat): Fix uninitialized output when converting a zero value to a special byteorder format.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/doublest.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 085b615..1f823ca 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
+ output when converting a zero value to a special byteorder format.
+
2017-11-02 Yao Qi <yao.qi@linaro.org>
* frame.c (do_frame_register_read): Remove aspace.
diff --git a/gdb/doublest.c b/gdb/doublest.c
index fe9fc23..ef98dde 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -387,7 +387,7 @@ convert_doublest_to_floatformat (const struct floatformat *fmt,
}
if (dfrom == 0)
- return; /* Result is zero */
+ goto finalize_byteorder; /* Result is zero */
if (dfrom != dfrom) /* Result is NaN */
{
/* From is NaN */