]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix regression on ARM after Target FP patches
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 3 Nov 2017 15:07:23 +0000 (16:07 +0100)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 3 Nov 2017 15:07:23 +0000 (16:07 +0100)
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.

gdb/ChangeLog
gdb/doublest.c

index 085b615369874cb31ad2cbe7b492738a6e31b999..1f823ca533e4ae72f4e6c5e0a785130f65fccc52 100644 (file)
@@ -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.
index fe9fc23d711b512976958c6beb8d26554876c166..ef98dde8cbdc2076afd800c9b39a600b8dfb5eb6 100644 (file)
@@ -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 */