On Fri, 8 Jun 2007, Malcolm J. Currie wrote:
> > > ==10189== Process terminating with default action of signal 2 (SIGINT)
> > > ==10189== at 0x42027896: kill (in /lib/tls/libc-2.3.2.so)
> > > ==10189== by 0x52BFEFFF: ???
> > > ==10189== by 0x1EAA31C6: astTransform_ (mapping.c:21951)
> > > ==10189== by 0x1E94E30E: Transform (cmpmap.c:2714)
> >
> > valgrind should just exit cleanly, so mentioning this during close (albeit
> > after you control-c'd out) is clearly bad, especially since:
>
> Thanks for the quick reply Peter. The first time around there was a
> few-minute pause then valgrind completed its report including the
> precise AST location where the crash occurred. After fixing a
> deliberate piece of coding to initialise one of the two values bad (as
> that's all that was needed), valgrind never returned its last part after
> some 15 minutes and I broke in.
>
> It appears to be a subtle bug.
I'd assumed that, which is about where I usually starting switching off
all compiler optimisations, been bit by them too many times. Note that by
default we compile with "-g -O2", which as Tim pointed out gives line
numbers, but I'd try "make CFLAGS=-g" to compile AST before ruling out
this idea.
> > I'm not aware of any other valgrind tools that could help here. So you've
> > stuck with the traditional ones (gdb + mark one eyeball).
>
> It's ddd + eyeball. At times like these I leave it until after a good
> night's sleep and walk through the code. BTW is there a way of printing
> character values as strings in gdb/ddd instead of eight characters for
> each value character that include its ASCII collation table number? To
> check some MathMap expressions I had to cut the "print forexp" and paste
> it into a file, and use multiple replacements in my editor to make the
> string readable.
You won't like it:
(gdb) set language c
(gdb) print string
$18 = "Hello World"
Cheers,
Peter.
|