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] |
Caroline Tice <ctice@apple.com> writes:
! cfun = DECL_STRUCT_FUNCTION (current_function_decl); ! if (!cfun->unlikely_text_section_name) { ! if (flag_function_sections ! && DECL_SECTION_NAME (current_function_decl)) ! { ! name = xstrdup (TREE_STRING_POINTER (DECL_SECTION_NAME ! (current_function_decl))); ! stripped_name = targetm.strip_name_encoding (name); ! len = strlen (stripped_name); ! buffer = (char *) xmalloc (len + 10); ! sprintf (buffer, "%s%s", stripped_name, "_unlikely"); ! cfun->unlikely_text_section_name = ggc_strdup (buffer); ! free (buffer); ! free (name); ! free (strippped_name); ! }
It is not correct to free stripped_name. Most targetm.strip_name_encoding definitions modify their argument in place. You should have checked this yourself.
Mea culpa. I'm sorry. If I remove that statement, and this revised patch passes all the tests, is this okay to commit?
-- Caroline ctice@apple.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |