[GHC] #8371: ghci byte compiler + FFI crashes when used with embedded R

GHC ghc-devs at haskell.org
Fri Sep 27 23:48:39 CEST 2013


#8371: ghci byte compiler + FFI crashes when used with embedded R
----------------------------------+-------------------------------
       Reporter:  dsamperi        |             Owner:
           Type:  bug             |            Status:  new
       Priority:  normal          |         Milestone:
      Component:  GHCi            |           Version:  7.6.3
       Keywords:                  |  Operating System:  Linux
   Architecture:  x86_64 (amd64)  |   Type of failure:  GHCi crash
     Difficulty:  Unknown         |         Test Case:
     Blocked By:                  |          Blocking:
Related Tickets:                  |
----------------------------------+-------------------------------
 The ghci interpreter destroys the C stack when initializing embedded R
 (the statistical
 software system available at http://cran.r-project.org/). There is no
 problem using
 embedded R with ghc (compiled code). I have had no problems using ghci
 with other FFI projects, and this does not appear to be a linking problem
 (there are no undefined references).

 To reproduce the problem (under Fedora Linux using ghc 7.6.3) download the
 R source code, unpack, and (using haskellRtest.hs is attached):
 0. cd R-3.0.2
 1. ./configure --enable-R-shlib
 2. make
 3. make install
 4. cd <haskelltestdir>
 5. ghci -L/usr/local/lib64/R/lib -lR haskellRtest.hs
 6. Main> main
 Loading...
 Initialize R session...
 Error: C stack usage is too close to the limit

 Notes:
 1. No computations are done, the failure happens during startup.
 2. The C functions called are in <R source>/src/unix/Rembedded.c
 3. The error message is issued from <R source>/src/main/errors.c
 4. I tried increasing the system level C stack size limit but this didn't
 help.
 5. As noted above, there are no problems when ghc is used.

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



More information about the ghc-tickets mailing list