From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 99795800BE for ; Sat, 11 Feb 2017 15:02:25 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=christoph.hoeger@celeraone.com; spf=Pass smtp.mailfrom=christoph.hoeger@celeraone.com; spf=None smtp.helo=postmaster@mail-io0-f177.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@celeraone.com) identity=pra; client-ip=209.85.223.177; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@celeraone.com"; x-sender="christoph.hoeger@celeraone.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of christoph.hoeger@celeraone.com designates 209.85.223.177 as permitted sender) identity=mailfrom; client-ip=209.85.223.177; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@celeraone.com"; x-sender="christoph.hoeger@celeraone.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-io0-f177.google.com) identity=helo; client-ip=209.85.223.177; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@celeraone.com"; x-sender="postmaster@mail-io0-f177.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AWtHG4BF9fxXWKOIT9u2TYJ1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ7zpcqwAkXT6L1XgUPTWs2DsrQf2raQ4/GrBDFIyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+?= =?us-ascii?q?K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g8wdFn8KiSqgQ+HwwAmJUSRSfGq1R6?= =?us-ascii?q?J65jY2B4+8JYzOQo23ibuH0WGwGZgANTMOMUyFDXq9L9bMYPwLci/HZ5Y5yjE?= =?us-ascii?q?=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CdAAAVGJ9Yf7HfVdFeHQEFAQsBGAEFA?= =?us-ascii?q?QsBhREHg1KzWIkYB0MUAQEBAQEBAQEBAQESAQEJCwsKGzGCMxsBghEzHQEBOB0?= =?us-ascii?q?BBzcCJBIBBQEiiX2jNz+LGmiCJYMIAQEFiGoIEo9EgwUMLoJflUSGM4FPkEWLe?= =?us-ascii?q?IUNkU4UHoEVNoEhUWkFhBqCDj81AYo1AQEB?= X-IPAS-Result: =?us-ascii?q?A0CdAAAVGJ9Yf7HfVdFeHQEFAQsBGAEFAQsBhREHg1KzWIk?= =?us-ascii?q?YB0MUAQEBAQEBAQEBAQESAQEJCwsKGzGCMxsBghEzHQEBOB0BBzcCJBIBBQEii?= =?us-ascii?q?X2jNz+LGmiCJYMIAQEFiGoIEo9EgwUMLoJflUSGM4FPkEWLeIUNkU4UHoEVNoE?= =?us-ascii?q?hUWkFhBqCDj81AYo1AQEB?= X-IronPort-AV: E=Sophos;i="5.35,146,1484002800"; d="scan'208,217";a="212878047" Received: from mail-io0-f177.google.com ([209.85.223.177]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 11 Feb 2017 15:02:24 +0100 Received: by mail-io0-f177.google.com with SMTP id j18so67631354ioe.2 for ; Sat, 11 Feb 2017 06:02:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=celeraone-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=kudQSwV1JQncQTQwggAjh7GBOFQL+e6/yeJiD3NC8yg=; b=CHDoPm/d6idLDb+zKNDGMJ7FO6ufO2Wv+H9lHE7y6sx+Dt1z6sskrkzWX8JdBzZHwa wLpqe3IWdy2Y6u7Zo63u97OyHZEpdK/XRPa/0OC8Ups1EvSKpBLxARSj4eYxgBXYSU8/ SDMtXuNaSZnYQeBdve+oSbsO9GD/l4pAE0CnQkw0RwWr2pGMOKQLiyGLQvkHkQop/p+x MqP2kPRc8wSlN+qQVjdF3wnu0puHeHyCQhYcSjlo3rAcbIUMcIZO2C/QaqWBmPoMiX9/ AEe5unWqUjSC6DlfiG9E3xTVAILUG34D/XQNS+CXYiUWhqqnabMS34BBriz82BzdEg0A Xc2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kudQSwV1JQncQTQwggAjh7GBOFQL+e6/yeJiD3NC8yg=; b=n6xkeAU7nOeXES8irZR1sKiGFxLnFbmDCHWlUj4xvJiyIyfwXuul6XObDOKf1zUW8g GMB+EOmwBNRlLBFki9oDHNWhRGEuNSPWtXj/DqglHQrjvIPHjJBiUgSTByp7kZTM3sA5 FM/OU5ObvBPgFLfuMXgNLwAUXzKkM+aH2Eo/b3smZUPJ0Si3swqd+R6eFeUHtrc/+ipC 7wBYVIOdZz43jY1jBHIjRcbDZdTByknn0ekyp63Z11F0FywJsfqAfKKgTPAuBm+JDMz9 aAh4OZmGNLH3+80+hb8k6Mlqd+YUrp5YS6rifG5f86FSlN3dcIiqhpnelDS7H609ASXw VlCw== X-Gm-Message-State: AMke39mYSPlosvdwRDdRfrmKk/f+4eSu8PEcK5rPr4WPcKF96zM8cewxecAK/xi/816zhXGRhGFoAxvAAY8tAsbv X-Received: by 10.107.7.78 with SMTP id 75mr15521365ioh.165.1486821742651; Sat, 11 Feb 2017 06:02:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.48.211 with HTTP; Sat, 11 Feb 2017 06:02:22 -0800 (PST) From: =?UTF-8?Q?Christoph_H=C3=B6ger?= Date: Sat, 11 Feb 2017 15:02:22 +0100 Message-ID: To: OCaml Mailing List Content-Type: multipart/alternative; boundary=001a113f98d2d0ee82054841a91d Subject: [Caml-list] How is the frametable handled when throwing exceptions? --001a113f98d2d0ee82054841a91d Content-Type: text/plain; charset=UTF-8 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 --001a113f98d2d0ee82054841a91d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear all,

while stud= ying camls native code generation and garbage collection strategy, I came u= pon Connor Benner's bachelor thesis from 2012, where he implemented a l= lvm 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). Thr= owing an exception that becomes a mov/pop/ret operation. This however, seem= s to interfere with garbage collection: From the C-API, it seems that all l= ocal roots are stored in the frametable via some special macros (e.g. CAMLP= aram, CAMLlocal).

When control just returns from a stack fram= e, how are the entries removed from the frametable?

I would b= e glad, if someone could answer this or point me to the relevant documentat= ion (if any exists).

thanks,

Christoph
--001a113f98d2d0ee82054841a91d--