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: [PATCH] New fixes for hot/cold partitioning


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


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