[commit: ghc] master: rts/MachO: Iterate through N (all) symbols, not M external symbols (2548908)

git at git.haskell.org git at git.haskell.org
Thu Nov 22 21:05:40 UTC 2018


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

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

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

commit 254890855ee04762cc0392da19e0c42fc039a718
Author: Dario Bertini <berdario at google.com>
Date:   Fri Nov 16 15:49:37 2018 +0100

    rts/MachO: Iterate through N (all) symbols, not M external symbols
    
    Fixes #15105


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

254890855ee04762cc0392da19e0c42fc039a718
 rts/linker/MachO.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c
index 87888e9..fd36cd2 100644
--- a/rts/linker/MachO.c
+++ b/rts/linker/MachO.c
@@ -1661,7 +1661,7 @@ ocGetNames_MachO(ObjectCode* oc)
     commonCounter = (unsigned long)commonStorage;
 
     if (oc->info->symCmd) {
-        for (int i = 0; i < oc->n_symbols; i++) {
+        for (size_t i = 0; i < oc->info->n_macho_symbols; i++) {
             SymbolName* nm = oc->info->macho_symbols[i].name;
             MachONList *nlist = &oc->info->nlist[i];
             if((nlist->n_type & N_TYPE) == N_UNDF



More information about the ghc-commits mailing list