aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2014-09-23 23:18:19 -0700
committerCary Coutant <ccoutant@google.com>2014-09-23 23:20:57 -0700
commit635aa30e3ae9735e362cfd1cda2be9f7b65b32a2 (patch)
tree928d596357248c244e46007b15b558bcc386f16f /gold/gold.cc
parentf4ebacfac0581274ead4c3ab43c316c6174790b3 (diff)
downloadgdb-635aa30e3ae9735e362cfd1cda2be9f7b65b32a2.zip
gdb-635aa30e3ae9735e362cfd1cda2be9f7b65b32a2.tar.gz
gdb-635aa30e3ae9735e362cfd1cda2be9f7b65b32a2.tar.bz2
Fix race condition causing assert in Eh_frame_hdr::do_sized_write().
2014-09-23 Taiju Tsuiki <tzik@google.com> Cary Coutant <ccoutant@google.com> gold/ * gold.cc (queue_final_tasks): Add Write_sections_task as a blocker on input_sections_blocker. * layout.cc (Write_sections_task::locks): Unblock input_sections_blocker_. * layout.h (Write_sections_task::Write_sections_task): Add input_sections_blocker. * testsuite/Makefile.am (exception_x86_64_bnd_test): Add gcctestdir/ld to DEPENDENCIES. * testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index 4833aec..bdfb33d 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -808,6 +808,8 @@ queue_final_tasks(const General_options& options,
if (!any_postprocessing_sections)
{
input_sections_blocker = new Task_token(true);
+ // Write_symbols_task, Relocate_tasks.
+ input_sections_blocker->add_blocker();
input_sections_blocker->add_blockers(input_objects->number_of_relobjs());
}
@@ -836,6 +838,7 @@ queue_final_tasks(const General_options& options,
// Queue a task to write out the output sections.
workqueue->queue(new Write_sections_task(layout, of, output_sections_blocker,
+ input_sections_blocker,
final_blocker));
// Queue a task to write out everything else.