|
From: Jeremy F. <je...@go...> - 2005-01-10 18:03:25
|
On Mon, 2005-01-10 at 16:53 +0000, Julian Seward wrote:
> > Oh, it definitely works. There are messages coming out, but it mostly
> > looks like ld.so suppressable chaff. And I fixed a leak after I did the
> > malloc/free substitution.
>
> Good.
>
> What leak is that? I would be interested to see it.
There were a handful of small leaks, but the biggest was this:
if(VG_(strncmp)(si->symtab[i].name, VG_INTERCEPT_PREFIX,
VG_INTERCEPT_PREFIX_LEN) == 0) {
int len = VG_(strlen)(si->symtab[i].name);
char *buf = VG_(malloc)(len), *colon;
intercept_demangle(si->symtab[i].name, buf, len);
colon = buf + VG_(strlen)(buf) - 1;
while(*colon != ':') colon--;
VG_(strncpy_safely)(si->symtab[i].name, colon+1, len);
}
in vg_symtab2.c:canonicaliseSymtab(). (The "while(*colon != ':')..."
loop looks a bit dubious to me as well, since it will fail to terminate
if there's no ':'.)
But bear in mind I haven't run anything very complex under V+V yet, so
it hasn't really been exercised at all.
J
|