* [Google 4.7] Fix for Google Ref: b/8028506 (issue7142053)
@ 2013-01-18 18:45 Sterling Augustine
2013-01-18 19:04 ` Cary Coutant
0 siblings, 1 reply; 3+ messages in thread
From: Sterling Augustine @ 2013-01-18 18:45 UTC (permalink / raw)
To: gcc-patches, reply
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Google 4.7] Fix for Google Ref: b/8028506 (issue7142053)
2013-01-18 18:45 [Google 4.7] Fix for Google Ref: b/8028506 (issue7142053) Sterling Augustine
@ 2013-01-18 19:04 ` Cary Coutant
2013-01-18 21:50 ` Sterling Augustine
0 siblings, 1 reply; 3+ messages in thread
From: Cary Coutant @ 2013-01-18 19:04 UTC (permalink / raw)
To: Sterling Augustine; +Cc: gcc-patches, reply
> 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
OK for google/gcc-4_7.
I'll be filing an upstream bug for this problem, and I'd like to get
this fix into 4.8 as well.
-cary
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Google 4.7] Fix for Google Ref: b/8028506 (issue7142053)
2013-01-18 19:04 ` Cary Coutant
@ 2013-01-18 21:50 ` Sterling Augustine
0 siblings, 0 replies; 3+ messages in thread
From: Sterling Augustine @ 2013-01-18 21:50 UTC (permalink / raw)
To: Cary Coutant; +Cc: gcc-patches, reply
On Fri, Jan 18, 2013 at 11:04 AM, Cary Coutant <ccoutant@google.com> wrote:
>> 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
>
> OK for google/gcc-4_7.
>
> I'll be filing an upstream bug for this problem, and I'd like to get
> this fix into 4.8 as well.
>
> -cary
Committed as posted. Thanks. These do need to go into trunk, as they
complicate using fission.
Sterling
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-18 21:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 18:45 [Google 4.7] Fix for Google Ref: b/8028506 (issue7142053) Sterling Augustine
2013-01-18 19:04 ` Cary Coutant
2013-01-18 21:50 ` Sterling Augustine
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).