Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "David McClain" <dmcclain1@mindspring.com>
To: "caml" <caml-list@inria.fr>
Subject: [Caml-list] C++ Stack Frames
Date: Fri, 27 Aug 2004 21:40:13 -0700	[thread overview]
Message-ID: <002801c48cb9$216fccf0$0401000a@dylan> (raw)

Note, I am not implying that OCaml does the conversion of an unhandled
exception to a call to abort(). Rather, I can show you that this happens
down in the throw handler in libstdc++. I can produce this error in a pure
C++ program without any OCaml around to do anything.

What puzzles me, and at the same time, inspires admiration for the OCaml
team, is that they somehow manage to neutralize these ascending escapes.
Were it not for that, there might be a lot of unhandled cleanup in the OCaml
code that gets bypassed.

No the correct way to handle this situation is down close to the calls into
the throwing C++ code, and not far up the dynamic stack chain.

It appears from reading the runtime sources on OCaml that they are doing
some signal magic. I just was taken by surprise that this happened in a
foreign function call as well. That seems like unnecessary overhead most of
the time, but probably keeps dummies from getting burned to badly....

David McClain
Senior Corporate Scientist
Avisere, Inc.

+1.520.390.7738 (USA)
david.mcclain@avisere.com



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2004-08-28  4:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-28  4:40 David McClain [this message]
2004-08-28  9:04 ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002801c48cb9$216fccf0$0401000a@dylan' \
    --to=dmcclain1@mindspring.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox