summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-06-29 21:48:43 +0100
committerSimon Marlow <marlowsd@gmail.com>2016-07-01 13:20:04 +0100
commitee8d1facb20ab579c44bf4cd7d5fd807d547b6ad (patch)
treea479019d20198ab994467121cfae487b69fab99f
parent6ba4197e006b6d6bc2657141d4c10c91bd806cb3 (diff)
downloadhaskell-ee8d1facb20ab579c44bf4cd7d5fd807d547b6ad.tar.gz
Remove unused oc->isImportLib (#12230)
Summary: This field is never set, but it was being tested and used to decide whether to resolve an object or not. This caused non-deterministic crashes when using the RTS linker (see #12230). I suspect this is not the correct fix, but putting it up so that Phyx can tell us what the right fix should be. Test Plan: validate Reviewers: austin, Phyx, bgamari, erikd Subscribers: erikd, thomie, ezyang Differential Revision: https://phabricator.haskell.org/D2371 GHC Trac Issues: #12230
-rw-r--r--rts/Linker.c4
-rw-r--r--rts/LinkerInternals.h5
2 files changed, 1 insertions, 8 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index f7ac748b20..b41bc1a641 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1703,9 +1703,7 @@ void freeObjectCode (ObjectCode *oc)
* Sets the initial status of a fresh ObjectCode
*/
static void setOcInitialStatus(ObjectCode* oc) {
- if (oc->isImportLib == HS_BOOL_TRUE) {
- oc->status = OBJECT_DONT_RESOLVE;
- } else if (oc->archiveMemberName == NULL) {
+ if (oc->archiveMemberName == NULL) {
oc->status = OBJECT_NEEDED;
} else {
oc->status = OBJECT_LOADED;
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 5686863cbb..729cf1d792 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -160,11 +160,6 @@ typedef struct _ObjectCode {
ForeignExportStablePtr *stable_ptrs;
- /* Indicates whether if the .o file comes from
- an import library. In which case we shouldn't
- execute code from it. */
- HsBool isImportLib;
-
/* Holds the list of symbols in the .o file which
require extra information.*/
HashTable *extraInfos;