#4464: RTS options broken for dynamic libraries
---------------------------------+------------------------------------------
Reporter: rl | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.2.1
Component: Runtime System | Version: 7.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonmar):
I think Roman is right, not copying the arguments is bad because the
caller doesn't know the lifetime requirements for the memory (it is done
this way because historically `hs_init` was called with the real `argv`,
which is statically allocated so it doesn't matter). In retrospect I
should have fixed this in my recent cleanup of `RtsFlags`, but forgot
about this ticket.
If `hs_init` needs to return an error condition rather than aborting, then
we need to define a new API for that, and fix `setupRtsFlags`. I don't
think we need to do this for every case of `stg_exit` and certainly not
for `barf`: these are all internal error conditions and we have no
sensible way to recover.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4464#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs