Re: MLton and Valgrind

David Hansel <[email protected]> Fri, 02 Mar 2012 19:25:03 -0500
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <[email protected]>
On 3/2/2012 11:50 AM, Wesley W. Terpstra wrote:
> On Thu, Mar 1, 2012 at 10:24 PM, David Hansel
> <[email protected]> wrote:
>> ==19049==  Address 0x467b000 is not stack'd, malloc'd or (recently) free'd
> 
> That warning is correct. The entire ML heap (and stack) is allocated
> directly using mmap.
> 
> Unfortunately, I know absolutely nothing about Valgrind, so can't
> comment further ...

I don't think that the mmap is the problem.  If it were then Valgrind
should also complain about code that does not load FFI functions.
In my case it only complains if an FFI is loaded (but not necessarily
called).

I'm happy to share the code to reproduce this.  Just let me know where
to send/upload the ZIP file.

FYI,  here's some info about the system on which I'm testing this:

> uname -a
Linux 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 i686
GNU/Linux
> gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
> mlton
MLton 20100608 (built Tue Jun  8 13:48:45 EDT 2010 on
fenrirvm-ubuntu-10-04-i386)
> valgrind --version
valgrind-3.6.0.SVN-Debian

David

-- 
---
  ----------------------------------------------------------
  David Hansel
  Chief Technology Officer -- Reactive Systems, Inc.
  http://www.reactive-systems.com/
  (919) 324-3507 ext. 102 -- [email protected]
  OpenPGP (GnuPG) public key file:
  http://www.reactive-systems.com/~hansel/pgp_public_key.txt
  ----------------------------------------------------------

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/