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 979DEBDDB for ; Fri, 2 Sep 2005 14:08:40 +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 j82C2e3K028903 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 2 Sep 2005 14:08:40 +0200 Received: from deneb.vpn.enyo.de ([212.9.189.177] helo=deneb.enyo.de) by albireo.enyo.de with esmtp id 1EBAFj-0003MX-Sf for caml-list@yquem.inria.fr; Fri, 02 Sep 2005 14:02:39 +0200 Received: from fw by deneb.enyo.de with local (Exim 4.52) id 1EBAFD-0002pJ-Fc for caml-list@yquem.inria.fr; Fri, 02 Sep 2005 14:02:07 +0200 From: Florian Weimer To: caml-list@yquem.inria.fr Subject: Unsafe features Date: Fri, 02 Sep 2005 14:02:07 +0200 Message-ID: <87slwny8xs.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce with ID 43183F60.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; florian:01 ocaml:01 compiler:01 run-time:01 pointer:01 deallocation:01 heap:01 integer:01 reasoning:01 arithmetic:01 unsafe:01 unsafe:01 constructs:02 declarations:02 objects:02 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 Has Ocaml any unsafe features? With "unsafe", I mean constructs which, when (ab)used in certain ways, make further reasoning about the behavior of the program impossible (and neither the compiler nor the run-time system provides a diagnosis). Examples in other languages are out-of-bounds array access, null pointer dereference, integer arithmetic overflow, premature deallocation of heap objects, wrong type declarations -- you get the idea. The C language interface falls into this category. Are there any other problematic areas?