[commit: testsuite] master: Update linker_unload to cope with CAFs (9fd0ffd)
git at git.haskell.org
git at git.haskell.org
Thu Nov 21 13:28:36 UTC 2013
Repository : ssh://git@git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9fd0ffdfb88448a274ac9c08c966933b3a8d23c8/testsuite
>---------------------------------------------------------------
commit 9fd0ffdfb88448a274ac9c08c966933b3a8d23c8
Author: Simon Marlow <marlowsd at gmail.com>
Date: Thu Nov 21 12:20:13 2013 +0000
Update linker_unload to cope with CAFs
>---------------------------------------------------------------
9fd0ffdfb88448a274ac9c08c966933b3a8d23c8
tests/rts/Test.hs | 7 ++++++-
tests/rts/linker_unload.c | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/rts/Test.hs b/tests/rts/Test.hs
index c01485e..a65e7d3 100644
--- a/tests/rts/Test.hs
+++ b/tests/rts/Test.hs
@@ -1,6 +1,11 @@
module Test where
f :: Int -> Int
-f x = x + 1
+f x = x + head caf
+
+-- make sure that even when we have a CAF, we can unload the code
+caf :: [Int]
+caf = [1..10]
foreign export ccall f :: Int -> Int
+
diff --git a/tests/rts/linker_unload.c b/tests/rts/linker_unload.c
index 9850318..55870c3 100644
--- a/tests/rts/linker_unload.c
+++ b/tests/rts/linker_unload.c
@@ -30,7 +30,7 @@ int main (int argc, char *argv[])
hs_init(&argc, &argv);
- initLinker();
+ initLinker_(0);
for (i=1; i < argc; i++) {
#if defined(mingw32_HOST_OS)
More information about the ghc-commits
mailing list