egcs aborts on invalid input

Jeffrey A Law law@cygnus.com
Tue May 5 00:50:00 GMT 1998


  In message < 199805050218.TAA18467@rtl.cygnus.com >you write:
  > 	EGCS 1.0.2, as well as 1998-04-25, crash with Abort Trap when presented
  >  with
  > 	an invalid input.
  > 
  > 	void f(void)
  > 	{
  > 		char *const line = "/dev/ptyXX";
  > 		line[8] = 1;
  > 		return line;
  > 	}
  > 
  > We can use the modifier flag to tell whether we are reading or writing to
  > the string.  I just checked in this patch to fix the problem.
  > 
  > Mon May  4 19:14:15 1998  Jim Wilson  <wilson@cygnus.com>
  > 
  > 	* expr.c (expand_expr, case INDIRECT_REF): Don't optimize string
  > 	reference if this is a store.
BTW -- I just checked in the testcase to the testsuite.

jeff



More information about the Gcc-bugs mailing list