|
From: Alison Z. <ali...@au...> - 2005-01-11 22:41:31
|
Hi, I am trying to check memory leak problem of my C program in linux. And here is the result ==11795== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux. ==11795== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. ==11795== Using valgrind-2.0.0, a program supervision framework for x86-linux. ==11795== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. ==11795== ==11795== My PID = 11795, parent PID = 9058. Prog and args are: ==11795== ./cim ==11795== Estimated CPU clock rate is 3076 MHz ==11795== For more details, rerun with: -v ==11795== ==11795== Syscall param modify_ldt(ptr)(func=1 or 0x11) contains uninitialised or unaddressable byte(s) ==11795== at 0x405DF0D8: (within /usr/lib/libGL.so.1.0.5336) ==11795== Address 0xBFFFEF90 is on thread 1's stack ==11795== ==11795== Source and destination overlap in memcpy(0x43b053f8, 0x43b053f8, 4) ==11795== at 0x4002473A: memcpy (mac_replace_strmem.c:95) ==11795== by 0x40423163: (within /usr/X11R6/lib/libXt.so.6.0) ==11795== by 0x40423586: _XtGetResources (in /usr/X11R6/lib/libXt.so.6.0) ==11795== by 0x4040EE8C: (within /usr/X11R6/lib/libXt.so.6.0) ==11795== ==11795== Source and destination overlap in memcpy(0x43b16618, 0x43b16618, 4) ==11795== at 0x4002473A: memcpy (mac_replace_strmem.c:95) ==11795== by 0x40423163: (within /usr/X11R6/lib/libXt.so.6.0) ==11795== by 0x40423821: _XtGetSubresources (in /usr/X11R6/lib/libXt.so.6.0) ==11795== by 0x404238EA: XtGetSubresources (in /usr/X11R6/lib/libXt.so.6.0) ==11795== ==11795== Use of uninitialised value of size 8 ==11795== at 0x81A56CE: CompColMatVec_double(int, int, int, double const &, double const *, int const *, int const *, double const *, int, double *, int) (spmm.cc:140) ==11795== by 0x81A69AA: dcscmm_ (spmm.cc:567) ==11795== by 0x819F773: CompCol_Mat_double::operator*(MV_Vector_double const &) const (compcol_double.cc:289) ==11795== by 0x8173053: CimModelRVLVFFD::calcLocalParams(int) (CimModel/CimModel/CimModelRVLVFFD.C:393) ==11795== ==11795== More than 30000 total errors detected. I'm not reporting any more. ==11795== Final error counts will be inaccurate. Go fix your program! ==11795== Rerun with --error-limit=no to disable this cutoff. Note ==11795== that errors may occur in your program without prior warning from ==11795== Valgrind, because errors are no longer being displayed. ==11795== ==11795== FATAL: M_PROCMAP_BUF is too small; increase it and recompile Then the program just exited here. Could someone please tell me how to fix this problem. Thanks a lot. Alison |