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]
Other format: [Raw text]

Re: rs6000 : too short memory allocation



On Feb 13, 2005, at 3:36 PM, Christophe Jaillet wrote:


Description : in gcc/config/rs6000/rs6000.c, a string is allocated using
alloca and then filled using a sprintf.
I think that the allocated string is 1 byte too short. The format used with
sprintf is \"L%011d$spb\", so there should be up to 11 '0' in the result not
only 10.


02005-02-13 Christophe Jaillet <christophe.jaillet@wanadoo.fr>

* rs6000.c (machopic_output_stub): correct size for alloca (was 1 byte
too short)

OK.


(alloca allocations get rounded up to a multiple of 4 on Darwin, so this wasn't
actually a bug.)



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