This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
tiny alias patch
- To: jfc at mit dot edu, egcs-patches at cygnus dot com
- Subject: tiny alias patch
- From: Richard Henderson <rth at twiddle dot rth dot home>
- Date: Fri, 5 Jun 1998 03:53:44 -0700
- Reply-To: Richard Henderson <rth at cygnus dot com>
I found a segv building the alpha linux kernel this evening.
Seems we read past the allocated size of the reg_base_value
array.
r~
Fri Jun 5 03:52:59 1998 Richard Henderson <rth@cygnus.com>
* alias.c (find_base_value): Bound reads into reg_base_value.
Index: alias.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/alias.c,v
retrieving revision 1.32
diff -u -p -r1.32 alias.c
--- alias.c 1998/05/21 22:12:04 1.32
+++ alias.c 1998/06/05 10:51:26
@@ -129,8 +129,8 @@ find_base_value (src)
The test above is not sufficient because the scheduler may move
a copy out of an arg reg past the NOTE_INSN_FUNCTION_BEGIN. */
if (REGNO (src) >= FIRST_PSEUDO_REGISTER
- && reg_base_value[REGNO (src)])
- return reg_base_value[REGNO (src)];
+ && REG_BASE_VALUE (src))
+ return REG_BASE_VALUE (src);
return src;