This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

tiny alias patch


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;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]