From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 AFC187EE88 for ; Fri, 29 Apr 2016 13:04:30 +0200 (CEST) IronPort-PHdr: 9a23:bMJ7XBHjeZbtnknqrd7l5Z1GYnF86YWxBRYc798ds5kLTJ75o8SwAkXT6L1XgUPTWs2DsrQf27qQ4/6rAjdIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/nh6bipdaIOE1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvK68xSLgdCDU9L0g04tfqvF/NV13cyGEbVzAzmwBLHhPy0xz76ZL4tC2y4u90wiqHJovpQLEvQjGr6aFDSRmulDoCcTI0pjKEwvdshb5W9Ury7yd0xJTZNdmY Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=markus.weissmann@in.tum.de; spf=None smtp.mailfrom=markus.weissmann@in.tum.de; spf=None smtp.helo=postmaster@mail-out1.informatik.tu-muenchen.de Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of markus.weissmann@in.tum.de) identity=pra; client-ip=131.159.0.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="markus.weissmann@in.tum.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of markus.weissmann@in.tum.de) identity=mailfrom; client-ip=131.159.0.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="markus.weissmann@in.tum.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-out1.informatik.tu-muenchen.de) identity=helo; client-ip=131.159.0.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="postmaster@mail-out1.informatik.tu-muenchen.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BIAAB9PiNXkAgAn4NehAt9pzaUPx6HIDsRAQEBAQEBAQERAQEBAQcNCQkhL4Itgj4PAQVVIQImAl8biCKiVo9ikVl8jhhigjSCVgWYE44QgjyHAYVbRY5rNoFtAQEBUoFXOjCJAQEBAQ X-IPAS-Result: A0BIAAB9PiNXkAgAn4NehAt9pzaUPx6HIDsRAQEBAQEBAQERAQEBAQcNCQkhL4Itgj4PAQVVIQImAl8biCKiVo9ikVl8jhhigjSCVgWYE44QgjyHAYVbRY5rNoFtAQEBUoFXOjCJAQEBAQ X-IronPort-AV: E=Sophos;i="5.24,551,1454972400"; d="scan'208";a="176196694" Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 29 Apr 2016 13:04:29 +0200 Received: from webmail.in.tum.de (localhost [127.0.0.1]) by vmwebmail1.informatik.tu-muenchen.de (Postfix) with ESMTP id 522E92403AE for ; Fri, 29 Apr 2016 13:04:29 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 29 Apr 2016 13:04:29 +0200 From: =?UTF-8?Q?Markus_Wei=C3=9Fmann?= To: Message-ID: X-Sender: markus.weissmann@in.tum.de User-Agent: Roundcube Webmail/0.8.1 Subject: [Caml-list] Obj.out_of_heap_tag, out of minor heap or memory corruption? Hello, I have a server program that crashes after some time with a very strange error: The (=) comparison of two values returns false, even though they are pretty identical. They are of type { a : int; b : int } and the comparison always fails on the second integer. When printing the compared integers, they are always 0 (as expected) -- both of them; but are not equal (=). I started inspecting the values with the "Obj.tag" and found them to be always of type Obj.int_tag -- until the non-equalness strikes: One of the compared integers then always has Obj.out_of_heap_tag. This value surprisingly behaved like an integer unless compared to another: let (x : int) = print_int x; (* "0" *) assert (x = 0) (* fails! *) Can someone explain what this tag means exactly and if this works-as-intended or if my heap must have gotten hit by some faulty C bindings? Is this some out-of-memory handling of the minor heap? If I set Gc.minor_heap_size to 4 MByte I don't get the Obj.out_of_heap_tag -- or at least haven't yet. This is ocaml 4.02.3 on amd64. Regards Markus -- Markus Weißmann, M.Sc. Technische Universität München Institut für Informatik Boltzmannstr. 3 D-85748 Garching Germany http://wwwknoll.in.tum.de/