Matlab assumes malloc etc give 8-byte aligned blocks. You can
make V do this with --alignment=8. I should put this in the FAQ
I guess.
J
On Tuesday 20 May 2003 9:30 am, Sami Romdhani wrote:
> Hi,
>
> I have a C++ program which requires the Matlab (www.mathworks.com)
> libraries to work. This is the most usual c++ program, the only thing is
> that it requires matlab libraries in order to read .mat files.
>
> When I use valgrind on a (ripped off) version of my program which was
> not linked with the matlab lib, it works. When linked with the matlab
> libs it does not and the following error message appears when I run
> valgrind on my program:
>
> ==6422== Memcheck, a.k.a. Valgrind, a memory error detector for
> x86-linux.
> ==6422== Copyright (C) 2002, and GNU GPL'd, by Julian Seward.
> ==6422== Using valgrind-1.9.6, a program instrumentation system for
> x86-linux.
> ==6422== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
> ==6422== Estimated CPU clock rate is 2787 MHz
> ==6422== For more details, rerun with: -v
> ==6422==
> Table 1. block_array is currupt
> mwmem.c:1010: Assert : Forced Assertion "Unaligned pointer found in
> cache"
> Aborted
>
> I tried to look in the source code of valgrind for this mwmem.c file,
> but couldn't find it. I'm then assuming that this files comes from the
> matlab libraries (difficult to be sure as nm does not work on the matlab
> .so libs)
>
> So, is there any chance to use valgrind with programs linked with matlab
> libraries or not ?
>
> Sami.
|