This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] New fixes for hot/cold partitioning
- From: Ian Lance Taylor <ian at airs dot com>
- To: Caroline M Tice <ctice at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 04 Apr 2005 12:59:41 -0400
- Subject: Re: [PATCH] New fixes for hot/cold partitioning
- References: <6B738E1E-A527-11D9-BC0C-0030656ADC2A@apple.com>
Caroline M Tice <ctice@apple.com> writes:
> - It changes unlikely_text_section_name from a char* to an array;
> initializes it appropriately, changes all uses of it to reflect the
> new format; and removes the call to free it.
I missed the reasons for making this change, but it looks questionable
to me. It's not hard to construct C++ templates in which section
names are identical in the first 256 characters.
And I would recommend using snprintf rather than sprintf. It's easier
to be confident that snprintf is safe.
Ian