From 635aa30e3ae9735e362cfd1cda2be9f7b65b32a2 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Tue, 23 Sep 2014 23:18:19 -0700 Subject: Fix race condition causing assert in Eh_frame_hdr::do_sized_write(). 2014-09-23 Taiju Tsuiki Cary Coutant 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. --- gold/gold.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gold/gold.cc') 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. -- cgit v1.1