This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rs6000 : too short memory allocation
- From: Dale Johannesen <dalej at apple dot com>
- To: Christophe Jaillet <christophe dot jaillet at wanadoo dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, Dale Johannesen <dalej at apple dot com>
- Date: Mon, 14 Feb 2005 10:58:03 -0800
- Subject: Re: rs6000 : too short memory allocation
- References: <00bb01c51224$d5fa4b00$96cefea9@none>
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.)