[commit: ghc] ghc-8.0: Linker: ARM: Ensure that cache flush covers all symbol extras (7d2f41c)

git at git.haskell.org git at git.haskell.org
Sun Jan 3 20:08:28 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/7d2f41c093c09bdb66ff4c18b811bf75ef31aee5/ghc

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

commit 7d2f41c093c09bdb66ff4c18b811bf75ef31aee5
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Jan 3 13:25:37 2016 +0100

    Linker: ARM: Ensure that cache flush covers all symbol extras
    
    Previously part of the last symbol extra wasn't covered.
    
    Differential Revision: https://phabricator.haskell.org/D1728
    
    (cherry picked from commit 0490fede24b4fc5d5d1b23e9a47899e50b14988c)


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

7d2f41c093c09bdb66ff4c18b811bf75ef31aee5
 rts/Linker.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index cb90c97..82e00e1 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -2758,7 +2758,9 @@ ocFlushInstructionCache( ObjectCode *oc )
     }
 
     // Jump islands
-    __clear_cache(oc->symbol_extras, &oc->symbol_extras[oc->n_symbol_extras]);
+    // Note the (+1) to ensure that the last symbol extra is covered by the
+    // flush.
+    __clear_cache(oc->symbol_extras, &oc->symbol_extras[oc->n_symbol_extras+1]);
 }
 
 #endif



More information about the ghc-commits mailing list