[Git][ghc/ghc][master] testsuite: Remove test that dlopens a PIE object.

Marge Bot gitlab at gitlab.haskell.org
Sun Mar 29 21:31:37 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
7e7cb714 by Marius Bakke at 2020-03-29T17:31:27-04:00
testsuite: Remove test that dlopens a PIE object.

glibc 2.30 disallowed dlopening PIE objects, so just remove the test.
Fixes #17952.

- - - - -


4 changed files:

- testsuite/tests/dynlibs/Makefile
- testsuite/tests/dynlibs/T13702.hs
- testsuite/tests/dynlibs/T13702.stdout
- − testsuite/tests/dynlibs/T13702a.hs


Changes:

=====================================
testsuite/tests/dynlibs/Makefile
=====================================
@@ -60,6 +60,4 @@ T5373:
 .PHONY: T13702
 T13702:
 	'$(TEST_HC)' -v0 -dynamic -rdynamic -fPIC -pie T13702.hs
-	'$(TEST_HC)' -v0 -dynamic T13702a.hs
-	./T13702  # first make sure executable itself works
-	./T13702a # then try dynamically loading it as library
+	./T13702


=====================================
testsuite/tests/dynlibs/T13702.hs
=====================================
@@ -2,8 +2,3 @@
 
 main :: IO ()
 main = putStrLn "hello world"
-
-foreign export ccall "hello" hello :: IO ()
-
-hello :: IO ()
-hello = putStrLn "hello world again"


=====================================
testsuite/tests/dynlibs/T13702.stdout
=====================================
@@ -1,2 +1 @@
 hello world
-hello world again


=====================================
testsuite/tests/dynlibs/T13702a.hs deleted
=====================================
@@ -1,12 +0,0 @@
-{-# LANGUAGE ForeignFunctionInterface #-}
-
-import Foreign
-import System.Posix.DynamicLinker
-
-main :: IO ()
-main = do
-    dl <- dlopen "./T13702" [RTLD_NOW]
-    funptr <- dlsym dl "hello" :: IO (FunPtr (IO ()))
-    mkAction funptr
-
-foreign import ccall "dynamic" mkAction :: FunPtr (IO ()) -> IO ()



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7e7cb714173652165b8372c3450f4ccd6a377497

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7e7cb714173652165b8372c3450f4ccd6a377497
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200329/66783736/attachment-0001.html>


More information about the ghc-commits mailing list