Boost logo

Boost Users :

From: Tarjei Knapstad (tarjeik_at_[hidden])
Date: 2003-06-18 06:42:01


On Tue, 2003-06-17 at 14:45, Vladimir Prus wrote:
> michael_wangzy wrote:
>
> > HI,
> > I start looking at the Graph library and try the quick_tour.cpp
> > on my machine. Here is something wrong I found out
> >
> >> gcc --vesion
> > gcc (GCC) 3.3 (Gentoo Linux 1.4, PVR 3.3)
> >
> >> g++ -o test -O2 quick_tour.cpp
> >> ./test
> > vertices(g) = A B C D E
> > edges(g) = (A,B) (A,D) (C,A) (D,C) (C,E) (B,D) (D,E)
> > vertex: 0
> > out-edges: (0,134545512) (0,134545536)
>
> ...
>
> > Note: the large numbers in the out-edges , like 134545512. Expected
> > numbers are 0,1,2,3,4. Seems some fields are not initilized but read.
>
> Hmm... here with 3.3 on Debian it works ok.

AFAIK Gentoo is a source based distro, which means you've built the
compiler yourself at some point (or Gentoo has done it for you). Maybe
some subtle error was introduced when building the compiler and/or
standard library?

> Do you have 'valgrind' utility
> installed or easily installable on your box. If so, you might run
>
> valgrind test
>
> and tell if it spots any uninitialized memory reads. If that does not help,
> I'm at loss...
>
If it doesn't something is seriously wrong, most likely with your
compiler build. You can get Valgrind here btw:

http://devel-home.kde.org/~sewardj/

--
Tarjei

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net