This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
mips print_operand corrupts stack with CONST_DOUBLE
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 14 Oct 2002 16:21:21 -0300
- Subject: mips print_operand corrupts stack with CONST_DOUBLE
- Organization: GCC Team, Red Hat
I ran into stack corruption while bootstrapping on mips-linux. This
patch fixes it. It's based on Jan's 2002-10-08 fix to print-rtl.c.
Makes me think we may need a typedef for string buffers meant to hold
ascii representations of real values or so...
Until we get that... Ok to install?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* config/mips/mips.c (print_operand): Increase buffer size for
real numbers.
Index: gcc/config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.c,v
retrieving revision 1.235
diff -u -p -r1.235 mips.c
--- gcc/config/mips/mips.c 4 Oct 2002 13:50:40 -0000 1.235
+++ gcc/config/mips/mips.c 14 Oct 2002 19:17:50 -0000
@@ -5911,7 +5911,7 @@ print_operand (file, op, letter)
&& GET_MODE_CLASS (GET_MODE (op)) == MODE_FLOAT)
{
REAL_VALUE_TYPE d;
- char s[30];
+ char s[60];
REAL_VALUE_FROM_CONST_DOUBLE (d, op);
REAL_VALUE_TO_DECIMAL (d, s, -1);
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer