-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve Langasek wrote:
> Rather, the segfault happens in camlPrintf__entry, which is called
> from caml_startup__code_begin.  I can't find a definition for
> camlPrintf__entry anywhere, and I do in fact see some
> suspicious-looking differences when disassembling this code.  Can you
> tell me where in the ocaml source I can find this definition, and/or
> how I can get ocaml to spit out for me the corresponding asm?

ocamlopt has a -S option, similar to gcc.  To generate the assembly file
for printf do,
ocaml-3.09.0$ cd stdlib
stdlib$ ocamlopt -c -S printf.ml
stdlib$ $EDITOR printf.s

The __entry symbols are the static initializers for OCaml modules, they
are executed very early and only once.  Also, note that not all
invocations of camlPrintf__entry cause the segfault.  The tiny program:
  let _ = Printf.printf "hello\n"
does not segfault, even though gdb steps through the same line in
camlPrintf__entry (with different data obviously).  However my utter
lack of knowledge for alpha assembly and linking internals is
restricting any further investigation.  If you need another binary which
does segfault, you can grab the program: escher:~mfurr/felix-1.1.1/bin/flxg


Cheers,
- -Mike
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDl63S7ZPKKRJLJvMRAjR6AKC6gOtHAot/T7dMj476o6ywkmaO1QCcDy3A
WWzPBkt+Sutf2rRBljTh+dc=
=Xfhm
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to