From: saugustine@google.com (Sterling Augustine)
To: gcc-patches@gcc.gnu.org, reply@codereview.appspotmail.com
Subject: [Google 4.7] Fix for Google Ref: b/8028506 (issue7142053)
Date: Fri, 18 Jan 2013 18:45:00 -0000 [thread overview]
Message-ID: <20130118184528.97A18A1657@sterling.mtv.corp.google.com> (raw)
commit dc0b9bc855444332e7a3b1f3473a70ce0c72d66c
Author: Sterling Augustine <saugustine@google.com>
Date: Fri Jan 18 10:38:30 2013 -0800
Fix for Google Ref: b/8028506
Calling find_AT_string can resize the debug_str hash table, even if the
string is already present in the hash table--go figure. So after indices
have been assigned, and the hash table is exactly three-quarters full,
calling find_AT_string is verboten.
This change moves some calls around such that the above scenario never
happens, all strings will be found and assigned prior to indices being
assigned.
M gcc/dwarf2out.c
Tested:
With full bootstrap and fission testing.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 5ca22b2..5099c39 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -9407,9 +9407,6 @@ output_skeleton_debug_sections (dw_die_ref comp_unit)
remove_AT (comp_unit, DW_AT_producer);
remove_AT (comp_unit, DW_AT_language);
- /* Add attributes common to skeleton compile_units and type_units. */
- add_top_level_skeleton_die_attrs (comp_unit);
-
switch_to_section (debug_skeleton_info_section);
ASM_OUTPUT_LABEL (asm_out_file, debug_skeleton_info_section_label);
@@ -24087,6 +24084,10 @@ dwarf2out_finish (const char *filename)
if (dwarf_split_debug_info)
{
unsigned int index = 0;
+ /* Before we assign string indexes, we need to add the string
+ attributes to the skeleton compile unit and type units. */
+ add_top_level_skeleton_die_attrs (main_comp_unit_die);
+ (void) get_skeleton_type_unit ();
htab_traverse_noresize (debug_str_hash, index_string, &index);
}
--
This patch is available for review at http://codereview.appspot.com/7142053
next reply other threads:[~2013-01-18 18:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 18:45 Sterling Augustine [this message]
2013-01-18 19:04 ` Cary Coutant
2013-01-18 21:50 ` Sterling Augustine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130118184528.97A18A1657@sterling.mtv.corp.google.com \
--to=saugustine@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=reply@codereview.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).