[commit: ghc] master: Enable checkProddableBlock on x86_64 (da3c1eb)

git at git.haskell.org git at git.haskell.org
Sat May 21 18:14:42 UTC 2016


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

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

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

commit da3c1ebb8a57e81f12c5be192e477f79158a2398
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Sat May 21 18:36:49 2016 +0200

    Enable checkProddableBlock on x86_64
    
    We've been seeing some memory corruption after using the linker, and I
    want to enable this to see if it catches anything.
    
    Test Plan:
    * validate
    * modified the linker_unload test to remove the performGC calls to use
      as a benchmark, saw no significant difference after this change.
    
    Reviewers: bgamari, erikd, austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2245


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

da3c1ebb8a57e81f12c5be192e477f79158a2398
 rts/Linker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index 61b10d8..e867d04 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -4034,7 +4034,7 @@ ocGetNames_PEi386 ( ObjectCode* oc )
 
       if (kind != SECTIONKIND_OTHER && end >= start) {
           addSection(&sections[i], kind, SECTION_NOMEM, start, sz, 0, 0, 0);
-          addProddableBlock(oc, start, end - start + 1);
+          addProddableBlock(oc, start, sz);
       }
 
       stgFree(secname);
@@ -5756,7 +5756,7 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
 
       IF_DEBUG(linker,debugBelch("Reloc: P = %p   S = %p   A = %p\n",
                                         (void*)P, (void*)S, (void*)A ));
-      /* checkProddableBlock ( oc, (void*)P ); */
+      checkProddableBlock(oc, (void*)P, sizeof(Elf_Word));
 
 #if defined(sparc_HOST_ARCH) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH)
       value = S + A;



More information about the ghc-commits mailing list