From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 96FA6BDDB for ; Sat, 3 Sep 2005 11:40:39 +0200 (CEST) Received: from mail.enyo.de (mail.enyo.de [212.9.189.167]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j839ecsr023980 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 3 Sep 2005 11:40:39 +0200 Received: from deneb.vpn.enyo.de ([212.9.189.177] helo=deneb.enyo.de) by albireo.enyo.de with esmtp id 1EBUVp-0000lC-Vd; Sat, 03 Sep 2005 11:40:38 +0200 Received: from fw by deneb.enyo.de with local (Exim 4.52) id 1EBUVF-0007rX-JB; Sat, 03 Sep 2005 11:40:01 +0200 From: Florian Weimer To: Damien Bobillot Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Unsafe features References: <87slwny8xs.fsf@mid.deneb.enyo.de> <2D13837B-0BDC-4E14-86DE-ADCCE2E3BC78@m4x.org> Date: Sat, 03 Sep 2005 11:40:01 +0200 In-Reply-To: <2D13837B-0BDC-4E14-86DE-ADCCE2E3BC78@m4x.org> (Damien Bobillot's message of "Sat, 3 Sep 2005 11:24:03 +0200") Message-ID: <87y86elcb2.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce with ID 43196F96.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; florian:01 caml-list:01 damien:01 arbitrary:01 functions:01 unsafe:01 unsafe:01 behave:02 string:03 imply:03 conversions:04 interface:05 problematic:05 creates:07 apparently:07 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 * Damien Bobillot: >> The C language interface falls into this category. Are there any >> other problematic areas? > > The Obj.magic function. I don't know exactly what it does, but I > think it does arbitrary type conversions. Apparently, it creates a bit-wise copy of a value and assigns it a new type. I discovered that there are also a couple of undocumented unsafe_* functions, such as String.unsafe_set, which behave the way their names imply (no bound schecks).