|
From: Andrew H. <and...@pe...> - 2004-08-02 01:39:44
|
Hi, I have just upgraded valgrind and have found that if I run valgrind --tool=memcheck -v ls it works fine, but if I run valgrind --tool=memcheck -v ls val* I get a core dump straight away. Is this a bug, or am I doing something stupid? Regards, Andrew |
|
From: Tom H. <th...@cy...> - 2004-08-02 06:22:36
|
In message <410...@pe...>
Andrew Hodgetts <and...@pe...> wrote:
> I have just upgraded valgrind and have found that if I run
>
> valgrind --tool=memcheck -v ls
>
> it works fine, but if I run
>
> valgrind --tool=memcheck -v ls val*
>
> I get a core dump straight away.
>
> Is this a bug, or am I doing something stupid?
A core dump in what? ls? or valgrind?
Valgrind is usually fairly verbose about failures so does it manage
to print anything or does it literally just stop with a core dump and
no output?
What does val* expand to in the directory in question? What happens
if you try this in another directory with less files that match that
pattern?
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Andrew H. <and...@pe...> - 2004-08-02 06:44:28
|
Tom Hughes wrote: >In message <410...@pe...> > Andrew Hodgetts <and...@pe...> wrote: > > > >>I have just upgraded valgrind and have found that if I run >> >>valgrind --tool=memcheck -v ls >> >>it works fine, but if I run >> >>valgrind --tool=memcheck -v ls val* >> >>I get a core dump straight away. >> >>Is this a bug, or am I doing something stupid? >> >> > >A core dump in what? ls? or valgrind? > >Valgrind is usually fairly verbose about failures so does it manage >to print anything or does it literally just stop with a core dump and >no output? > >What does val* expand to in the directory in question? What happens >if you try this in another directory with less files that match that >pattern? > >Tom > > > I only used 'ls' as an example. It occurs whenever I provide an argument for the program that I am trying to debug. Valgrind does not output anything and the core appears to be from valgrind. Below is the output straight from the console. /users/andrew/temp> ls * ata-raid-howto.pdf /users/andrew/temp> valgrind --tool=memcheck ls a* Segmentation fault (core dumped) |
|
From: Tom H. <th...@cy...> - 2004-08-02 07:25:21
|
In message <410...@pe...>
Andrew Hodgetts <and...@pe...> wrote:
> I only used 'ls' as an example. It occurs whenever I provide an
> argument for the program that I am trying to debug.
> Valgrind does not output anything and the core appears to be from
> valgrind. Below is the output straight from the console.
>
> /users/andrew/temp> ls *
> ata-raid-howto.pdf
> /users/andrew/temp> valgrind --tool=memcheck ls a*
> Segmentation fault (core dumped)
That's exceptionally odd. I was kind of assuming that if it was
failing very early (which it obviously is) then it would be down
to the val* having expanded to a large number of argument that was
overflowing something but obviously not.
The problem is that lots of people are using 2.1.2 and not seeing
this so it must be something about your system that is upsetting
it at a guess. What distribution/kernel/glibc are you using?
Does it work with --tool=none by the way?
It's possible that running the while thing under strace might
reveal some sort of clue into what it happening.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|