This is the mail archive of the
mailing list for the binutils project.
[gold patch] Fix crash when a member of a lib group can't be opened
- From: Cary Coutant <ccoutant at google dot com>
- To: Ian Lance Taylor <iant at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Wed, 12 Oct 2011 22:42:56 -0700
- Subject: [gold patch] Fix crash when a member of a lib group can't be opened
This patch fixes a problem where gold hit an internal error after
reporting an error for a file not found, if the missing file is a
member of a lib group. For lib groups, the next_blocker token is added
to the list of tokens to unblock automatically at the end of the task,
but a file not found would return false from do_read_symbols, and
Read_symbols::run would queue an unblock task, which would try to
unblock the token a second time.
Tested on x86_64.
2011-10-12 Cary Coutant <firstname.lastname@example.org>
* gold/readsyms.cc (Read_symbols::run): Don't queue an unblocker
task for members of lib groups.
Author: Cary Coutant <email@example.com>
Date: Wed Oct 12 22:37:46 2011 -0700
Don't queue an unblock task for members of lib groups.
diff --git a/gold/readsyms.cc b/gold/readsyms.cc
index 1e50942..9974722 100644
@@ -161,8 +161,10 @@ void
// If we didn't queue a new task, then we need to explicitly unblock
- // the token.
- if (!this->do_read_symbols(workqueue))
+ // the token. If the object is a member of a lib group, however,
+ // the token was already added to the list of locks for the task,
+ // and it will be unblocked automatically at the end of the task.
+ if (!this->do_read_symbols(workqueue) && this->member_ == NULL)