[Haskell-cafe] ffi call works fine in ghci but not as ghc compiledsegfault
Brandon Allbery
allbery.b at gmail.com
Sat Mar 15 02:30:50 UTC 2014
On Fri, Mar 14, 2014 at 7:23 PM, Miro Karpis <miroslav.karpis at gmail.com>wrote:
> here comes the c definition:
>
> int setmodulestring(char* parameter, int parameterLength, char* value, int valueLength, int setVarInArray);
>
>
If you had included this before (or perhaps noted that I specified Win32
API, not general C function) then I wouldn't have raised the CWString
issue. This declaration is not Win32 API and the original CString was
correct for it.
If you're still having issues... does this by any chance have any
association with threads? ghci uses the threaded runtime *and* handles
threads slightly differently from compiled code with -threaded (if it core
dumps in ghci with -no-ghci-sandbox then this may be the issue)?
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140314/1706db15/attachment.html>
More information about the Haskell-Cafe
mailing list