Re: MLton broken FFI on AMD64???
"Wesley W. Terpstra" <[email protected]>
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Feb 3, 2011 at 11:46 PM, Henry Cejtin <[email protected]>wrote: > The following program segfaults when run: > > val printf = _import "printf": string * int -> unit; > val () = printf ("You are a dog %d0000", 99) > val () = printf ("Hello silly %d0000", 123) > My first answer was: null terminate your string. However, the segfault persists. If you replace "printf" with "test": void test(const char* s, int x) { printf(s, x); } ... it works. The problem also only appears for me when I target amd64. i386 works. _______________________________________________ MLton mailing list [email protected] http://mlton.org/mailman/listinfo/mlton