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 D87F17FE44 for ; Mon, 4 Jul 2016 19:06:22 +0200 (CEST) IronPort-PHdr: 9a23:lF0/bRC60LUc51HxbpqcUyQJP3N1i/DPJgcQr6AfoPdwSP7+r8bcNUDSrc9gkEXOFd2CrakV06yM6eu5ATNIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWD14Ltjavro8KbSj4LrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884mosVJVKGyYr81V6cQWD8vNmRw4MzwqTHCSxGO7z0SSDNFvABPBl3u7Av7RYv2qivNlnRy1TPSacb2V7EvRTO67+FrTxLnhT0vKyN8+mzNjs12yq5W9kHy7ydjypLZNdnGfMF1ebnQKIsX Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=christoph.hoeger@tu-berlin.de; spf=None smtp.mailfrom=christoph.hoeger@tu-berlin.de; spf=None smtp.helo=postmaster@mail.tu-berlin.de Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@tu-berlin.de) identity=pra; client-ip=130.149.7.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="christoph.hoeger@tu-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@tu-berlin.de) identity=mailfrom; client-ip=130.149.7.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="christoph.hoeger@tu-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.tu-berlin.de) identity=helo; client-ip=130.149.7.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="postmaster@mail.tu-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ArAACZlnpXhyEHlYJbhD5SuTaBeYYYAoE4OBQBAQEBAQEBAREBAQEKCwkJIS+CMoIbAQQBIw8BSwsLGgImAgJXBg0GAgEBiCQIBKl0j0ExgQGHHgiCTYdBgloFjgSLD5gOhWOQCh6CT4FZbIkMAQEB X-IPAS-Result: A0ArAACZlnpXhyEHlYJbhD5SuTaBeYYYAoE4OBQBAQEBAQEBAREBAQEKCwkJIS+CMoIbAQQBIw8BSwsLGgImAgJXBg0GAgEBiCQIBKl0j0ExgQGHHgiCTYdBgloFjgSLD5gOhWOQCh6CT4FZbIkMAQEB X-IronPort-AV: E=Sophos;i="5.26,575,1459807200"; d="scan'208";a="183755566" Received: from mail.tu-berlin.de ([130.149.7.33]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jul 2016 19:06:13 +0200 X-tubIT-Incoming-IP: 91.66.20.202 Received: from ip5b4214ca.dynamic.kabel-deutschland.de ([91.66.20.202] helo=[192.168.178.42]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-6) with esmtpsa [TLSv1.2:DHE-RSA-AES128-SHA:128] for id 1bK7Jz-0007n9-6R; Mon, 04 Jul 2016 19:06:13 +0200 References: <03f0318e-3268-da14-d6e9-6efdcfcab567@tu-berlin.de> To: caml users From: =?UTF-8?Q?Christoph_H=c3=b6ger?= Organization: =?UTF-8?Q?Technische_Universit=c3=a4t_Berlin?= Message-ID: <8ff1d18d-581a-0269-fb0d-5bc70a1a9acd@tu-berlin.de> Date: Mon, 4 Jul 2016 19:06:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.7.4.170018 X-PMX-Spam: Gauge=IIIIIII, Probability=0%, Report='' Subject: Re: [Caml-list] Garbage collector woes Am 04.07.2016 um 18:21 schrieb Jeremy Yallop: > I'm guessing that 'desc' points to a block and N, MFIT and ICONV are > field accessors. That is correct. N, MFIT and ICONV are macros defined as Field(.., ..). > If so, you need to register 'desc' as a root here, since > caml_copy_double or caml_ba_alloc_dims could trigger a gc, moving desc > before it's next used. By registering as a root you mean to also declare it via CAMLlocal? Is this necessary/appropriate, since &desc is already a registered global root. Do you have any clue how that moving of desc could trigger the overwriting of x and cond? > It's probably also better not to call your exported function 'iconv', > since there's a POSIX function of that name. Good to know. I am merely implementing an API here, so these names aren't mine ;). -- Christoph Höger Technische Universität Berlin Fakultät IV - Elektrotechnik und Informatik Übersetzerbau und Programmiersprachen Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin Tel.: +49 (30) 314-24890 E-Mail: christoph.hoeger@tu-berlin.de