Hi list, I am trying to learn how to allocate a list in C and pass the result to Caml on an opteron Debian box. Here is the function that I use : #include #include #include #include value test_liste (value str) { // test function to return a list to caml value cons; cons = caml_alloc_small (2,0); caml_modify(&Field(cons,0),Val_int(0)); caml_modify(&Field(cons,1),Val_int(0)); printf("This is test_liste.\n"); printf(String_val(str)); fflush(stdout); if (Is_block(cons)) { printf("true\n");}; fflush(stdout); printf("cons has size %i \n",Wosize_val(cons)); fflush(stdout); return (cons); } I call it from (test_liste.ml) : external test_liste : string -> int list = "test_liste";; test_liste "oaue";; Makefile : gcc -c -I/usr/lib64/ocaml readPeaks.c ocamlc -custom readPeaks.o test_liste.ml -o a.out The a.out file is compiled without problems but it crashes with a segfault. However, if I compile on the same machine in a 32-bit chroot, the program works. Can anyone reproduce this behavior? Is that a bug linked to the 64bit implementation of Ocaml or is it a gcc bug? -- Li-Thiao-Té Sébastien