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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 3F2658015E for ; Sun, 11 Jun 2017 13:46:02 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=dra-news@metastack.com; spf=Pass smtp.mailfrom=dra-news@metastack.com; spf=None smtp.helo=postmaster@outmail148093.authsmtp.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.148.93; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of dra-news@metastack.com designates 62.13.148.93 as permitted sender) identity=mailfrom; client-ip=62.13.148.93; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@outmail148093.authsmtp.net) identity=helo; client-ip=62.13.148.93; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail148093.authsmtp.net"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AI9O5XBHbWbPPuSDODmp1DJ1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ7yp8uwAkXT6L1XgUPTWs2DsrQf2rWQ6/iocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZr?= =?us-ascii?q?KeTpAI7SiNm82/yv95HJbQhFgDiwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+?= =?us-ascii?q?NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjD?= =?us-ascii?q?QhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VjO/4ad2Ux/okD?= =?us-ascii?q?kIOCIl8G/ZjcxwibhUoBOnpxdix4LZb4WYOP94c6jAf90VWHBBU95RWSJfH428?= =?us-ascii?q?c4UBAekPPelas4bzqFQBrRylCAmwHePvzyNEimPq0aEk1ekqDAHI3BYnH9ILqH?= =?us-ascii?q?naos/6NLkTUe+o0aLF0THDb/dN2Tf68IjIag0qrPaRUrJqa8Xd0E8vGB3Lj1WL?= =?us-ascii?q?soHlOi2a1vgXvGiA8+pvT/6gi209pw5tpTivw94hh4/UjYwbzVDE8D92wIczJd?= =?us-ascii?q?CgSU57Z8SkEJpKuC2AOYt2WNsuQ3lytyYh1r0Jp4W0fCkMyJg92xHfbPmHf5CI?= =?us-ascii?q?4x35VOaRJjB4iGh5d7K4gha/91WrxO7kVsSs0VtGsDBJnsTCu3wXyhDe5cuKRu?= =?us-ascii?q?F580qvwTqP2R7c5+JYLU0xkKfWK5Esz7wsmZcWv0nMAiD7lFvzgaCIa0kr5/Kn?= =?us-ascii?q?5uH5bbr7vJCQKYl5gRzkPKs0gMywG+E4PxAOX2eF/eS806Xu/UrkQLVWi/05iK?= =?us-ascii?q?jZsJTHKckUpaO1HwtY34g55xmlEjemzNQYnWICLFJZYBKLlY7pNE/SIPzgDPe/?= =?us-ascii?q?hUqjkCtzyv3HILHtGIjBI3bZnLv8crtw6FRQxQ49wNxH4pJbELABIPb9Wk/rs9?= =?us-ascii?q?zYCwc0PBGuw+n9Edl90J0RWGyUAqKCNaPdr0OI6fg0I+mQfoAapDX9J+I56P7p?= =?us-ascii?q?iH81gUUdcrWx3ZsLdHC4GexrLFmDbnrphtcNCGMKvgslTOz2k1CCSj5SZ3OqX6?= =?us-ascii?q?0m/D07CYSmDZ3CRo+3mrCB0j27TdVqYTVvDl2cHGagWoqDQfASIHabJsJx1DsC?= =?us-ascii?q?UannR6cu0BivsEnxzL8xfcTO/ShNmZv91dQ9zunXjhYq7XQgA96UlmeAUHpcm2?= =?us-ascii?q?4UTiQq1at850d6zwHQguBDn/VEGIkLtLtyWQAgOMuAnuE=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DiAAAlLT1ZmF2UDT5dGwEBAQMBAQEJA?= =?us-ascii?q?QEBFgEBAQMBAQEJAQEBgmWBKoENjn+PTgaBBiEQgi+Fa49qLIV4AoMBQxQBAQE?= =?us-ascii?q?BAQEBAQEBARIBAQEBAQgLCwYoL0IOgWMMglkBAQEBAgEnEzQLBQsCAQgOCg0RE?= =?us-ascii?q?CEREwQBDQIEDgUSigIDCAUJAwELsnw6h0IDCoQVAQEBAQEBAQECAQEBAQEBAQE?= =?us-ascii?q?BAQEdhhuCUQuBPHo0gliCEoNCgjEFh24Mlgo7hyuHOoc/jyuLRokmNoErMCEjX?= =?us-ascii?q?RIBhQmBcnYBg2aGNQEBAQ?= X-IPAS-Result: =?us-ascii?q?A0DiAAAlLT1ZmF2UDT5dGwEBAQMBAQEJAQEBFgEBAQMBAQE?= =?us-ascii?q?JAQEBgmWBKoENjn+PTgaBBiEQgi+Fa49qLIV4AoMBQxQBAQEBAQEBAQEBARIBA?= =?us-ascii?q?QEBAQgLCwYoL0IOgWMMglkBAQEBAgEnEzQLBQsCAQgOCg0RECEREwQBDQIEDgU?= =?us-ascii?q?SigIDCAUJAwELsnw6h0IDCoQVAQEBAQEBAQECAQEBAQEBAQEBAQEdhhuCUQuBP?= =?us-ascii?q?Ho0gliCEoNCgjEFh24Mlgo7hyuHOoc/jyuLRokmNoErMCEjXRIBhQmBcnYBg2a?= =?us-ascii?q?GNQEBAQ?= X-IronPort-AV: E=Sophos;i="5.39,328,1493676000"; d="scan'208";a="278231338" Received: from outmail148093.authsmtp.net ([62.13.148.93]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2017 13:46:01 +0200 Received: from mail-c245.authsmtp.com (mail-c245.authsmtp.com [62.13.128.245]) by punt20.authsmtp.com (8.14.2/8.14.2/) with ESMTP id v5BBjxkx088719; Sun, 11 Jun 2017 12:45:59 +0100 (BST) Received: from romulus.metastack.com (114.212-105-213.static.virginmediabusiness.co.uk [213.105.212.114]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id v5BBjwEb083659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Jun 2017 12:45:59 +0100 (BST) Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id v5BBjuUp011383; Sun, 11 Jun 2017 12:45:56 +0100 Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0351.000; Sun, 11 Jun 2017 12:45:56 +0100 From: David Allsopp To: Alexey Egorov CC: "caml-list@inria.fr" Thread-Topic: [Caml-list] memory corruption using C stub Thread-Index: AQHS4f7ui67nCvnRhEeJyi0K29e8o6IfeYQAgAATD6o= Date: Sun, 11 Jun 2017 11:45:55 +0000 Message-ID: <3064D48A-0481-4CB2-B208-2E61AA08920D@metastack.com> References: , In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 89c1ba9a-4e9b-11e7-801f-9cb654bb2504 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNl8UURhQ KkJXbgASJgRFAnNE XXkJW1VTQFxzU2dw YQ9YIwdcYVRPXwB0 UklLXFNTEBpqBAMA SFgbIGsoMHAUeHZz Y0NrEHVdXEw0fU8u QxwFHDwbYTJpOn0e URVfagtUcVVXd0wX bFV7BiEPZGUDKBg1 TUcAFDk0OXBbKT9J d0kIIFcVW1dDFTkm XQ0aATQoGwUYXCQ1 IFQNYkUAAUx5 X-Authentic-SMTP: 61633634383431.1039:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 213.105.212.114/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: Re: [Caml-list] memory corruption using C stub > On 11 Jun 2017, at 12:38, Alexey Egorov wrote: >=20 > OK, I'm minimized this function as much as possible and it's still > crashing - https://pastebin.com/MZ0Qkh9B > Now I'm thinking that is compiler's bug on windows... Are you able to post the OCaml side of your minimised code? Which port of O= Caml are you using? David > 2017-06-10 20:33 GMT+05:00 Alexey Egorov : >> Hello, >>=20 >> I have an OCaml application with some C code which (I believe) is the >> reason of some random crashes. >>=20 >> Here is the code - https://pastebin.com/FVtLphZu >> This function reads file at given offset, divides data into chunks and >> compute checksums and compression ratio: >> external compute_data_props >> : string -> int -> int -> int -> (int * int * float) list =3D >> "compute_data_props" >>=20 >> The problem is, after some calls to this stub, application is crashing >> at random places in OCaml code. >> I can't figure out what's going wrong, but replacing this stub with >> dummy function (which does nothing but returns some predefined list) >> eliminates the problem. >>=20 >> What can we do to debug it? We are using OCaml 4.04.1 and Windows 10, >> and there is no other C stubs in our codebase. >>=20 >> Thanks! >=20 > --=20 > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs