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]

Re: [patch] Fix a segfault in h8300 port.


  In message <200110292352.PAA07006@cygnus.com>you write:
  > Hi,
  > 
  > Attached is a patch to fix the cause of a segfault in h8300 port.
  > 
  > Specifically, with the patch applied, gcc handles the following
  > correctly.
  > 
  > char tiny __attribute__ ((tiny_data)) = 0; 
  > 
  > char
  > foo (void) 
  > { 
  >   return tiny; 
  > } 
  > 
  > Tested on h8300 port.  OK to apply to both branches?
  > 
  > Kazu Hirata
  > 
  > 2001-10-29  Kazu Hirata  <kazu@hxi.com>
  > 
  > 	* config/h8300/h8300.c (h8300_encode_label): Compute a string
  > 	before passing it to ggc_alloc_string.
Err, why do you need to compute the new string before passing it to
ggc_alloc_string. 

Wouldn't fixing the length of the desired string passed to ggc_alloc_string
fix this problem?

jeff


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