On Thu, Jun 13, 2002 at 11:22:46PM +0300, Jarkko Hietaniemi wrote:
> > > >   _IO_read_end = 0x646e4128 <Address 0x646e4128 out of bounds>, 
> > > >   _IO_read_base = 0x73616572 <Address 0x73616572 out of bounds>, 
> > > >   _IO_write_base = 0x202e4a20 <Address 0x202e4a20 out of bounds>, 
> > > >   _IO_write_ptr = 0x6eb6c34b <Address 0x6eb6c34b out of bounds>, 
> > > >   _IO_write_end = 0x20296769 <Address 0x20296769 out of bounds>, 
> > > >   _IO_buf_base = 0x69736976 <Address 0x69736976 out of bounds>, 
> > > >   _IO_buf_end = 0x20646574 <Address 0x20646574 out of bounds>, 
> > > >   _IO_save_base = 0x20656874 <Address 0x20656874 out of bounds>, 
> > > >   _IO_backup_base = 0x53554150 <Address 0x53554150 out of bounds>, 
> > > >   _IO_save_end = 0x20200a45 <Address 0x20200a45 out of bounds>, 
> > > 
> > > These look fishy...
> > 
> > $ perl -le 'print pack "i", hex $_ foreach @ARGV' 0x646e4128 0x73616572 0x202e4a20 
>0x6eb6c34b 0x20296769 0x69736976 0x20646574 0x20656874 0x53554150 0x20200a45 
>0x20646e61 
> > (And
> > reas
> >  J. 
> > Kön
> > ig) 
> > visi
> > ted 
> > the 
> > PAUS
> > E
> 
> Ouch.  How did you even start to suspect this?  Because the hexdigitsq
> looked like fitting well into the ASCII range?

Yes. Basically. :-)
"I didn't get where I am today ..." by not being suspicious about 0x646e
It there seemed to be rather too many bytes in ASCII letter range.
Particularly that there were steady 4 bytes all in ASCII range. Most integers
and pointers don't look like that on 32 bit systems - most integers don't
need to be that big, and most pointers have more 0 bits in them.
(People (like me at work) will mess this up by trying to use all of the 32
bit memory map to store large volumes of data)

To be honest I didn't remember that 6x was lower case (ie I should actually
also be suspicious about numbers in the range 0x41-0x5A) but after finding
that I had a good start with a word:

$ perl -le 'print pack "i", hex $_ foreach @ARGV' 0x646e4128
(And

I just kept on going.

> > What's a good memory leak checker for running PAUSE under? valgrind with
> 
> Dunno about memory *leaks* but definitely looks like "fandango on core"...

Ah. That's what valgrind is good for finding the cause of.

By the way, did I say that I like valgrind?
I like ccache too. (The two are unrelated, other than they are both GPL and
I like them both). The samba folks have a new scary thing under development -
a distributed compile demon. I'm not sure how useful that is to most of us,
except that it should allow anyone with 2+ similar machines a chance to debug
Makefiles running under -j :-)

Nicholas Clark
-- 
Even better than the real thing:        http://nms-cgi.sourceforge.net/

Reply via email to