[commit: ghc] master: Remove unused oc->isImportLib (#12230) (ee8d1fa)

git at git.haskell.org git at git.haskell.org
Fri Jul 1 12:22:23 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ee8d1facb20ab579c44bf4cd7d5fd807d547b6ad/ghc

>---------------------------------------------------------------

commit ee8d1facb20ab579c44bf4cd7d5fd807d547b6ad
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Wed Jun 29 21:48:43 2016 +0100

    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


>---------------------------------------------------------------

ee8d1facb20ab579c44bf4cd7d5fd807d547b6ad
 rts/Linker.c          | 4 +---
 rts/LinkerInternals.h | 5 -----
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index f7ac748..b41bc1a 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 5686863..729cf1d 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;



More information about the ghc-commits mailing list