|
From: David E. <tw...@us...> - 2004-02-13 21:04:37
|
On Fri, 2004-02-13 at 15:05, Erik Sundnes L=F8vlie wrote:
> Hi, I'm having some trouble using valgrind. Likely I'm doing something
> wrong, but I couldn't find any info on this problem on the valgrind
> homepage.
> My program uses SDL, SDL_image, opengl and glu (mesa).
> I know it leaks memory, so it would be great if somebody could help me
> figure out what I'm doing wrong here.
The first thing you should do is to increase the length of the backtrace
with for example --num-callers=3D20 as parameter to valgrind.
> The output from valgrind is pasted below.
>=20
>=20
> [eriksul@myhost leved]$ valgrind ./leved
> =3D=3D8422=3D=3D Memcheck, a.k.a. Valgrind, a memory error detector for=
x86-linux.
> =3D=3D8422=3D=3D Copyright (C) 2002-2003, and GNU GPL'd, by Julian Sewa=
rd.
> =3D=3D8422=3D=3D Using valgrind-2.0.0, a program supervision framework =
for x86-linux.
> =3D=3D8422=3D=3D Copyright (C) 2000-2003, and GNU GPL'd, by Julian Sewa=
rd.
> =3D=3D8422=3D=3D Estimated CPU clock rate is 1106 MHz
> =3D=3D8422=3D=3D For more details, rerun with: -v
> =3D=3D8422=3D=3D
> =3D=3D8422=3D=3D valgrind's libpthread.so: KLUDGED call to: sem_destroy
> =3D=3D8422=3D=3D Use of uninitialised value of size 4
> =3D=3D8422=3D=3D at 0x403E546C: sigfpe_handler (in /usr/lib/libGL.so=
.1.4.050100)
> =3D=3D8422=3D=3D by 0x40187CDF: (within /usr/lib/valgrind/valgrind.s=
o)
> =3D=3D8422=3D=3D by 0x403E4E17: _mesa_init_all_x86_transform_asm (in
> /usr/lib/libGL.so.1.4.050100)
> =3D=3D8422=3D=3D by 0x40356053: _math_init_transformation (in
> /usr/lib/libGL.so.1.4.050100)
> =3D=3D8422=3D=3D
> =3D=3D8422=3D=3D Invalid read of size 2
> =3D=3D8422=3D=3D at 0x403E546C: sigfpe_handler (in /usr/lib/libGL.so=
.1.4.050100)
> =3D=3D8422=3D=3D by 0x40187CDF: (within /usr/lib/valgrind/valgrind.s=
o)
> =3D=3D8422=3D=3D by 0x403E4E17: _mesa_init_all_x86_transform_asm (in
> /usr/lib/libGL.so.1.4.050100)
> =3D=3D8422=3D=3D by 0x40356053: _math_init_transformation (in
> /usr/lib/libGL.so.1.4.050100)
> =3D=3D8422=3D=3D Address 0x6E is not stack'd, malloc'd or free'd
> Segmentation fault
--=20
Regards,
-\- David Eriksson -/-
SynCE - http://synce.sourceforge.net
CalcEm - http://calcem.sourceforge.net
Desquirr - http://desquirr.sourceforge.net
SetiWrapper - http://setiwrapper.sourceforge.net
|