GHC/MacOS X 'foreign export dynamic'
Ashley Yakeley
ashley@semantic.org
Tue, 2 Apr 2002 19:02:08 -0800
--Emailer_-1193952711
Content-Type: text/plain; charset="US-ASCII"
At 2002-03-22 15:52, Wolfgang Thaller wrote:
>A tar.gz file (14.5MB) of GHC for MacOS X is now available for download at:
>http://www.foldr.org/Software/Haskell/ghc/ghc-5.03-13032002-MacOSX.tar.gz
I think there's a bug in the support for 'foreign export dynamic'. The
enclosed code crashes intermittently. Sometimes it does this:
$ ./FEDBug
Haskell: making callback
Haskell: calling callback
native: calling callback
Haskell: haskellFunction
native: done calling callback
Haskell: done
And sometimes it does this:
$ ./FEDBug
Haskell: making callback
Haskell: calling callback
native: calling callback
Illegal instruction
It's about 50/50 on my MacOS X machine. The same code never crashes on my
Linux/i386 box.
--
Ashley Yakeley, Seattle WA
--Emailer_-1193952711
Content-Type: text/plain; name="FEDBug.hs";
x-mac-type="54455854";
x-mac-creator="00000000"
Content-transfer-encoding: base64
Content-Disposition: Attachment; filename="FEDBug.hs"
LS0gVGhpcyBpcyB3cml0dGVuIGluIEhhc2tlbGwuCgptb2R1bGUgTWFpbiB3aGVyZQoJewoJaW1w
b3J0IEZvcmVpZ247CgoJZm9yZWlnbiBleHBvcnQgZHluYW1pYyBtYWtlQ2FsbGJhY2sJOjogSU8g
KCkgLT4gSU8gKFB0ciAoKSk7CgoJZm9yZWlnbiBpbXBvcnQgY2FsbENhbGxiYWNrIDo6IFB0ciAo
KSAtPiBJTyAoKTsKCQoJaGFza2VsbEZ1bmN0aW9uIDo6IElPICgpOwoJaGFza2VsbEZ1bmN0aW9u
ID0gZG8KCQl7CgkJcHV0U3RyTG4gIkhhc2tlbGw6IGhhc2tlbGxGdW5jdGlvbiI7CgkJfTsKCQoJ
bWFpbiA6OiBJTyAoKTsKCW1haW4gPSBkbwoJCXsKCQlwdXRTdHJMbiAiSGFza2VsbDogbWFraW5n
IGNhbGxiYWNrIjsKCQljYWxsYmFjayA8LSBtYWtlQ2FsbGJhY2sgaGFza2VsbEZ1bmN0aW9uOwoJ
CXB1dFN0ckxuICJIYXNrZWxsOiBjYWxsaW5nIGNhbGxiYWNrIjsKCQljYWxsQ2FsbGJhY2sgY2Fs
bGJhY2s7CgkJcHV0U3RyTG4gIkhhc2tlbGw6IGRvbmUiOwoJCX07Cgl9Cg==
--Emailer_-1193952711
Content-Type: text/plain; name="Makefile";
x-mac-type="54455854";
x-mac-creator="522A6368"
Content-transfer-encoding: base64
Content-Disposition: Attachment; filename="Makefile"
dGVzdDogRkVEQnVnCgkuLyQ8CgpGRURCdWc6IEZFREJ1Zy5vIENhbGxDYWxsYmFjay5vCglnaGMg
LWZnbGFzZ293LWV4dHMgLXBhY2thZ2UgbGFuZyAtcGdtbCQoQ0MpICReIEZFREJ1Z19zdHViLm8g
LW8gJEAKCkNhbGxDYWxsYmFjay5vOiBDYWxsQ2FsbGJhY2suYwoJJChDQykgLWMgJDwgLW8gJEAK
CkZFREJ1Zy5vOiBGRURCdWcuaHMKCWdoYyAtZmdsYXNnb3ctZXh0cyAtcGFja2FnZSBsYW5nIC1w
Z21jJChDQykgLXBnbWEkKENDKSAtYyAkPCAtbyAkQAoKY2xlYW46CglybSAtZiAqLm8gKi5oaSAq
X3N0dWIuKiBGRURCdWcK
--Emailer_-1193952711
Content-Type: text/plain; name="CallCallback.c";
x-mac-type="54455854";
x-mac-creator="522A6368"
Content-transfer-encoding: base64
Content-Disposition: Attachment; filename="CallCallback.c"
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbGxDYWxsYmFjayh2b2lkICgqZikgKCkpCgl7Cglw
cmludGYoIm5hdGl2ZTogY2FsbGluZyBjYWxsYmFja1xuIik7CglmKCk7CglwcmludGYoIm5hdGl2
ZTogZG9uZSBjYWxsaW5nIGNhbGxiYWNrXG4iKTsKCX0K
--Emailer_-1193952711--