aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-02-23 17:42:26 +0000
committerIan Lance Taylor <ian@airs.com>2010-02-23 17:42:26 +0000
commit135b9c78b2e0da945e37dcd9e1206c6715854d44 (patch)
tree80ab95ab9ff4f534a4550257ffbbdef7a1a95cb7
parente707a91d99f5c250c14bf5b9d8fdac0358bb2693 (diff)
downloadgdb-135b9c78b2e0da945e37dcd9e1206c6715854d44.zip
gdb-135b9c78b2e0da945e37dcd9e1206c6715854d44.tar.gz
gdb-135b9c78b2e0da945e37dcd9e1206c6715854d44.tar.bz2
* gold.cc (queue_middle_tasks): If no input files were opened,
exit. * workqueue.h (Task_function::Task_function): Assert that there is a blocker.
-rw-r--r--gold/ChangeLog8
-rw-r--r--gold/gold.cc9
-rw-r--r--gold/workqueue.h2
3 files changed, 18 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 056a506..45017f2 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-23 Viktor Kutuzov <vkutuzov@accesssoftek.com>
+ Ian Lance Taylor <iant@google.com>
+
+ * gold.cc (queue_middle_tasks): If no input files were opened,
+ exit.
+ * workqueue.h (Task_function::Task_function): Assert that there is
+ a blocker.
+
2010-02-22 Doug Kwan <dougkwan@google.com>
* gold-threads.h (Once::~Once): Explicitly define virtual destructor.
diff --git a/gold/gold.cc b/gold/gold.cc
index 275d0f9..5450573 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -532,6 +532,15 @@ queue_middle_tasks(const General_options& options,
}
}
+ // If we failed to open any input files, it's possible for
+ // THIS_BLOCKER to be NULL here. There's no real point in
+ // continuing if that happens.
+ if (this_blocker == NULL)
+ {
+ gold_assert(parameters->errors()->error_count() > 0);
+ gold_exit(false);
+ }
+
// When all those tasks are complete, we can start laying out the
// output file.
// TODO(csilvers): figure out a more principled way to get the target
diff --git a/gold/workqueue.h b/gold/workqueue.h
index 7545224..9121e10 100644
--- a/gold/workqueue.h
+++ b/gold/workqueue.h
@@ -152,7 +152,7 @@ class Task_function : public Task
Task_function(Task_function_runner* runner, Task_token* blocker,
const char* name)
: runner_(runner), blocker_(blocker), name_(name)
- { }
+ { gold_assert(blocker != NULL); }
~Task_function()
{