This is the mail archive of the gcc-bugs@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]

Re: linux-2.1.103 crashes egcs-19980517 on i586



  In message <199805212117.OAA27882@penguin.transmeta.com>you write:
  > The asm is surrounded by
  > 
  > 	cli();
  > 	.. asm ..
  > 	restore_flags();
  > 
  > and both of those are either defined to be volatile asm's (for UP case)
  > or to be function calls (for SMP).  In either case gcc is _not_ legally
  > supposed to move the __asm__ with the lcall around them: the lcall asm
  > is has a "memory" modifier to mark that it can change memory. 
Adding the volatile is just a band-aid, it is not a fix.  I would
expect HJ to know that.  The compiler shouldn't be core dumping
in that manner no matter what input it receives.


  > nervous.  And it makes me irritated that people _continue_ to patch the
  > kernel instead of trying to fix the compiler. 
Can't argue with that.  I have to deal with it on a regular basis
myself.  I'd much rather be fixing problems than symptoms!  

It turned out to be a bug introduced in our alias code a short while
ago.  This bug does not effect the egcs-1.0.x releases.


        * alias.c (rtx_equal_for_memref_p): Handle SCRATCH as a memory
        address.

Index: alias.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/./gcc/alias.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -c -r1.31 -r1.32
*** alias.c	1998/05/17 13:47:28	1.31
--- alias.c	1998/05/21 22:12:04	1.32
***************
*** 467,472 ****
--- 467,476 ----
  	    return 0;
  	  break;
  
+ 	/* This can happen for an asm which clobbers memory.  */
+ 	case '0':
+ 	  break;
+ 
  	  /* It is believed that rtx's at this level will never
  	     contain anything but integers and other rtx's,
  	     except for within LABEL_REFs and SYMBOL_REFs.  */


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