[GHC] #14912: UnsafeReenter test fails with threaded1 and threaded2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[GHC] #14912: UnsafeReenter test fails with threaded1 and threaded2

GHC - devs mailing list
#14912: UnsafeReenter test fails with threaded1 and threaded2
--------------------------------------+---------------------------------
           Reporter:  alpmestan       |             Owner:  (none)
               Type:  bug             |            Status:  new
           Priority:  normal          |         Milestone:
          Component:  Runtime System  |           Version:  8.5
           Keywords:                  |  Operating System:  Linux
       Architecture:  x86_64 (amd64)  |   Type of failure:  None/Unknown
          Test Case:                  |        Blocked By:
           Blocking:                  |   Related Tickets:
Differential Rev(s):                  |         Wiki Page:
--------------------------------------+---------------------------------
 {{{
   /tmp/ghctest-n4fi8zlk/test   spaces/./ffi/should_fail/UnsafeReenter.run
 UnsafeReenter [bad exit code] (threaded1)
   /tmp/ghctest-n4fi8zlk/test   spaces/./ffi/should_fail/UnsafeReenter.run
 UnsafeReenter [bad exit code] (threaded2)
 }}}

 It's a quite simple program:

 {{{#!hs
 {-# LANGUAGE ForeignFunctionInterface #-}

 -- | Test that unsafe FFI calls crash the RTS if they attempt to re-enter
 -- Haskell-land
 module Main where

 import Foreign

 foreign import ccall "wrapper" wrap_f :: IO () -> IO (FunPtr (IO ()))
 foreign import ccall unsafe hello :: FunPtr (IO ()) -> IO ()

 f :: IO ()
 f = putStrLn "Back in Haskell"

 main :: IO ()
 main = do
     putStrLn "In Haskell"
     wrap_f f >>= hello
     putStrLn "Finished"
 }}}

 This just seem to hang (until timeout) with the `threaded1` and
 `threaded2` ways, instead of erroring out with:

 {{{
   UnsafeReenter: schedule: re-entered unsafely.
      Perhaps a 'foreign import unsafe' should be 'safe'?
 }}}

 which is the expected behaviour. I'll mark the test broken for those 2
 ways in an upcoming patch, but this probably deserves a new ticket, so
 here it is.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14912>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #14912: UnsafeReenter test fails with threaded1 and threaded2

GHC - devs mailing list
#14912: UnsafeReenter test fails with threaded1 and threaded2
-----------------------------------+--------------------------------------
        Reporter:  alpmestan       |                Owner:  (none)
            Type:  bug             |               Status:  new
        Priority:  normal          |            Milestone:
       Component:  Runtime System  |              Version:  8.5
      Resolution:                  |             Keywords:
Operating System:  Linux           |         Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown    |            Test Case:
      Blocked By:                  |             Blocking:
 Related Tickets:                  |  Differential Rev(s):
       Wiki Page:                  |
-----------------------------------+--------------------------------------

Comment (by alpmestan):

 I'm now seeing it hang with the `profthreaded` way as well.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14912#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets