caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] How is the frametable handled when throwing exceptions?
@ 2017-02-11 14:02 Christoph Höger
  2017-02-11 14:10 ` Nicolás Ojeda Bär
  2017-02-13 15:13 ` Stephen Dolan
  0 siblings, 2 replies; 5+ messages in thread
From: Christoph Höger @ 2017-02-11 14:02 UTC (permalink / raw)
  To: OCaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

Dear all,

while studying camls native code generation and garbage collection
strategy, I came upon Connor Benner's bachelor thesis from 2012, where he
implemented a llvm backend for ocamlopt. One intriguing remark mentioned
OCamls exception mechanism as basically consisting a pointer to the stack
frame of the last exception handler in a special register (r14, when I
recall correctly). Throwing an exception that becomes a mov/pop/ret
operation. This however, seems to interfere with garbage collection: From
the C-API, it seems that all local roots are stored in the frametable via
some special macros (e.g. CAMLParam, CAMLlocal).

When control just returns from a stack frame, how are the entries removed
from the frametable?

I would be glad, if someone could answer this or point me to the relevant
documentation (if any exists).

thanks,

Christoph

[-- Attachment #2: Type: text/html, Size: 974 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-13 15:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-11 14:02 [Caml-list] How is the frametable handled when throwing exceptions? Christoph Höger
2017-02-11 14:10 ` Nicolás Ojeda Bär
2017-02-12 13:25   ` Christoph Höger
2017-02-12 14:55     ` Nicolás Ojeda Bär
2017-02-13 15:13 ` Stephen Dolan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).