|
From: H. S. <hs....@gm...> - 2005-11-07 18:59:32
|
Hi, I just installed Valgrind 2.4 on my Debian Etch computer running 2.6.12kernel. I have a C++ code that I wrote which uses some FORTRAN libraries for some numerical stuff. I am trying to use valgring to see if I have managed my memory properly but I am facing some problems. Here is the output I get: $> valgrind prog < inputdata.dat =3D=3D10108=3D=3D Memcheck, a memory error detector for x86-linux. =3D=3D10108=3D=3D Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward = et al. =3D=3D10108=3D=3D Using valgrind-2.4.0, a program supervision framework for x86-linux. =3D=3D10108=3D=3D Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward = et al. @@ don't know what type '_' is @@ parsing __pool,true>:(0,452),0,64;; gave NULL type (_pool,true>:(0,452),0,64;; remains) @@ expected ':' at struct method MANGLE-ARGS (remains=3D"pool,true>:(0,452),0,64;;") @@ parsing (0,453)=3Ds1__common_pool<__gnu_cxx::__pool,true>:(0,452),0,64;; gave NULL type (s1__common_pool<__gnu_cxx::__pool,true>:(0,452),0,64;; remains) Segmentation fault My program runs okay without valgrind and I get the expected output. The program was compiled using GCC 4.0.2. Any suggestions or hints? thanks ->HS |
|
From: Tom H. <to...@co...> - 2005-11-07 19:06:03
|
In message <cc7...@ma...>
"H. S." <hs....@gm...> wrote:
> I just installed Valgrind 2.4 on my Debian Etch computer running
> 2.6.12kernel. I have a C++ code that I wrote which uses some FORTRAN
> libraries for
> some numerical stuff. I am trying to use valgring to see if I have managed
> my memory properly but I am facing some problems.
Is there some reason for using valgrind 2.4 rather than 3.0.1?
> Here is the output I get:
> $> valgrind prog < inputdata.dat
> ==10108== Memcheck, a memory error detector for x86-linux.
> ==10108== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
> ==10108== Using valgrind-2.4.0, a program supervision framework for
> x86-linux.
> ==10108== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
> @@ don't know what type '_' is
> @@ parsing __pool,true>:(0,452),0,64;; gave NULL type
> (_pool,true>:(0,452),0,64;; remains)
>
> @@ expected ':' at struct method MANGLE-ARGS
> (remains="pool,true>:(0,452),0,64;;")
> @@ parsing (0,453)=s1__common_pool<__gnu_cxx::__pool,true>:(0,452),0,64;;
> gave NULL type (s1__common_pool<__gnu_cxx::__pool,true>:(0,452),0,64;;
> remains)
> Segmentation fault
If this still happens with valgrind 3.0.1 then please raise a bug
report for it on the tracker - if you can provide a sample compiled
program that causes the problem then that would be very helpful.
> My program runs okay without valgrind and I get the expected output. The
> program was compiled using GCC 4.0.2.
Why on earth are you using stabs with gcc 4... Get rid of the -gstabs
and just use -g and it will use DWARF and everything will work.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: H. S. <hs....@gm...> - 2005-11-07 19:13:37
|
On 11/7/05, Tom Hughes <to...@co...> wrote: > > In message <cc7...@ma...> > "H. S." <hs....@gm...> wrote: > > > I just installed Valgrind 2.4 on my Debian Etch computer running > > 2.6.12kernel. I have a C++ code that I wrote which uses some FORTRAN > > libraries for > > some numerical stuff. I am trying to use valgring to see if I have > managed > > my memory properly but I am facing some problems. > > Is there some reason for using valgrind 2.4 rather than 3.0.1? Only that 3.0.1 does not appear to be available for Debain Testing yet. <SNIP> > > remains) > > Segmentation fault > > If this still happens with valgrind 3.0.1 then please raise a bug > report for it on the tracker - if you can provide a sample compiled > program that causes the problem then that would be very helpful. The program is quite complicated, so this may not be possible easily. But I will keep this in mind and if I can I will give an example. > My program runs okay without valgrind and I get the expected output. The > > program was compiled using GCC 4.0.2. > > Why on earth are you using stabs with gcc 4... Get rid of the -gstabs > and just use -g and it will use DWARF and everything will work. IIRC, there some problem with gdb quite a while ago and these flags seemed to work and I never reverted the flags. I will try your suggestion later today and report back. Thanks, ->HS |