[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libc 2.3.5 and heap corruption checking?



On Wed, Sep 07, 2005 at 09:29:04AM -0600, Ben Pearre wrote:

> *** glibc detected *** malloc(): memory corruption: 0x083ba0e8 ***
> zsh: abort (core dumped)  matlab -nosplash -nojvm

[...]

> (143)% export MALLOC_CHECK_=1
> (0)% matlab
[...]
> >> [1;2]*[3 4]
> 
> ------------------------------------------------------------------------
>        Segmentation violation detected at Wed Sep  7 00:55:16 2005
> ------------------------------------------------------------------------
[...]

Well, setting MALLOC_CHECK_ prevents glibc from calling abort() when it
detects heap corruption but it will _not_ fix the bug in Matlab.

You can do some more investigation though:

- Run Matlab on a machine with the old glibc, but set MALLOC_CHECK_ to
  2. If that also crashes, then the bug is clearly in Matlab and you
  should go complain to your Matlab vendor.

- Run Matlab under valgrind, that will show you more information about
  heap allocation (it can detect more problems than glibc´s internal
  checker and can also give much better location information if you have
  debugging symbols).

Gabor

-- 
     ---------------------------------------------------------
     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences
     ---------------------------------------------------------



Reply to: