does newForeignPtrEnv work?
Frederik Eaton
frederik at a5.repetae.net
Mon May 14 20:25:46 EDT 2007
Hello,
I am attaching files to hopefully reproduce a problem I am having. I
have not upgraded to 6.6.1 yet so let me know if it has been fixed.
$ touch fpenv_c.c fpenv.hs && cc -g -Wall -c fpenv_c.c && ghc -fasm --make fpenv.hs fpenv_c.o -lc
[1 of 1] Compiling Main ( fpenv.hs, fpenv.o )
Linking fpenv ...
$ ./fpenv
(x,xFP)=(0x08090628,0x08090628)
fin_test: env=0xa7900040, p=0x808e00c
zsh: segmentation fault ./fpenv
[139]$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6.20070420
Running in valgrind shows:
...
fin_test: env=0x437c008, p=0x1
==12777==
==12777== Jump to the invalid address stated on the next line
==12777== at 0x1F: ???
==12777== Address 0x1F is not stack'd, malloc'd or (recently) free'd
I think this is when fin_test exits. I am experiencing this problem in
a much larger program, so I wrote this test case to figure out what is
going wrong. Am I using the newForeignPtrEnv API incorrectly?
Many thanks,
Frederik
--
http://ofb.net/~frederik/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpenv.hs
Type: text/x-haskell
Size: 545 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20070515/217d82aa/fpenv.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpenv_c.c
Type: text/x-csrc
Size: 118 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20070515/217d82aa/fpenv_c.bin
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list