aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.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/layout.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/layout.cc')
-rw-r--r--gold/layout.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 82db775..ef0a879 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -5532,6 +5532,8 @@ void
Write_sections_task::locks(Task_locker* tl)
{
tl->add(this, this->output_sections_blocker_);
+ if (this->input_sections_blocker_ != NULL)
+ tl->add(this, this->input_sections_blocker_);
tl->add(this, this->final_blocker_);
}