unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Valgrind warnings with -1.8.6
@ 2009-04-06 15:05 Andrew Gaylard
  2009-04-07 10:40 ` Andrew Gaylard
  2009-04-30  9:12 ` Andrew Gaylard
  0 siblings, 2 replies; 10+ messages in thread
From: Andrew Gaylard @ 2009-04-06 15:05 UTC (permalink / raw)
  To: guile-user

Hi,

I'm linking with libguile on Linux, built from source, to extend my
C application with Scheme. I'm seeing a lot of warnings from
valgrind.  The same warnings appear when using Guile standalone.
Should I be worried?

The following steps show the problem:

Use this as hello-world.scm:

#!/usr/local//bin/guile \
-e main -s
!#

(define (main args)
  (display "hello world")
  (newline))

...And run it like this:

$ valgrind --tool=memcheck --gen-suppressions=all --num-callers=30
--track-fds=yes --trace-children=yes --log-file=hello-world.vg
--show-below-main=yes --leak-check=full --show-reachable=yes
--leak-resolution=high ./hello-world.scm

...Now hello-world.vg shows 47 warnings relating to uninitialised values:

$ grep '^==[0-9]*== [a-zA-Z]' ./hello-world.vg | awk '/FILE
DESCRIPTORS/ { x=0 } x==1 {print} /My PID/ { x=1 }' | sort | uniq -c
     33 ==12696== Conditional jump or move depends on uninitialised value(s)
     14 ==12696== Use of uninitialised value of size 4
      1 ==12696== Warning: bad signal number 0 in sigaction()

Thanks,
Andrew




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Valgrind warnings with -1.8.6
  2009-04-06 15:05 Valgrind warnings with -1.8.6 Andrew Gaylard
@ 2009-04-07 10:40 ` Andrew Gaylard
  2009-04-07 19:47   ` Andreas Rottmann
  2009-04-30  9:12 ` Andrew Gaylard
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Gaylard @ 2009-04-07 10:40 UTC (permalink / raw)
  To: guile-user

Hi,

I'm linking with libguile on Linux, built from source, to extend my
C application with Scheme. I'm seeing a lot of warnings from
valgrind.  The same warnings appear when using Guile standalone.
Should I be worried?

The following steps show the problem.

Use this as hello-world.scm:

#!/usr/local//bin/guile \
-e main -s
!#

(define (main args)
 (display "hello world")
 (newline))

...And run it like this:

$ valgrind --tool=memcheck --gen-suppressions=all --num-callers=30
--track-fds=yes --trace-children=yes --log-file=hello-world.vg
--show-below-main=yes --leak-check=full --show-reachable=yes
--leak-resolution=high ./hello-world.scm

...Now hello-world.vg shows 47 warnings relating to uninitialised values:

$ grep '^==[0-9]*== [a-zA-Z]' ./hello-world.vg | awk '/FILE
DESCRIPTORS/ { x=0 } x==1 {print} /My PID/ { x=1 }' | sort | uniq -c
    33 ==12696== Conditional jump or move depends on uninitialised value(s)
    14 ==12696== Use of uninitialised value of size 4
     1 ==12696== Warning: bad signal number 0 in sigaction()

Thanks,
Andrew




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Valgrind warnings with -1.8.6
  2009-04-07 10:40 ` Andrew Gaylard
@ 2009-04-07 19:47   ` Andreas Rottmann
  2009-04-07 21:25     ` Neil Jerram
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Rottmann @ 2009-04-07 19:47 UTC (permalink / raw)
  To: Andrew Gaylard; +Cc: guile-user

Andrew Gaylard <ag@computer.org> writes:

> Hi,
>
> I'm linking with libguile on Linux, built from source, to extend my
> C application with Scheme. I'm seeing a lot of warnings from
> valgrind.  The same warnings appear when using Guile standalone.
> Should I be worried?
>
No, this is normal AFAIK. The garbage collector in Guile messes up
valgrind. At some point, I had a working suppression file for that, but
it's likely to be bitrotted into unusability.

Regards, Rotty




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Valgrind warnings with -1.8.6
  2009-04-07 19:47   ` Andreas Rottmann
@ 2009-04-07 21:25     ` Neil Jerram
  2009-04-08  7:36       ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Neil Jerram @ 2009-04-07 21:25 UTC (permalink / raw)
  To: Andrew Gaylard; +Cc: guile-user

Andreas Rottmann <a.rottmann@gmx.at> writes:

> Andrew Gaylard <ag@computer.org> writes:
>
>> Hi,
>>
>> I'm linking with libguile on Linux, built from source, to extend my
>> C application with Scheme. I'm seeing a lot of warnings from
>> valgrind.  The same warnings appear when using Guile standalone.
>> Should I be worried?
>>
> No, this is normal AFAIK. The garbage collector in Guile messes up
> valgrind. At some point, I had a working suppression file for that, but
> it's likely to be bitrotted into unusability.

That is fundamentally true; however, we have recently addressed some
genuine Valgrind warnings in the 1.8.x development branch.  Those fixes
will show up if/when we release a 1.8.7, but in the meantime you may
like to look at the 1.8.x branch in Git, to see if any of the warnings
fixed match the ones that you are seeing.

      Neil




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Valgrind warnings with -1.8.6
  2009-04-07 21:25     ` Neil Jerram
@ 2009-04-08  7:36       ` Ludovic Courtès
  2009-04-08 13:38         ` Paul Emsley
  2009-04-12  7:11         ` Neil Jerram
  0 siblings, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2009-04-08  7:36 UTC (permalink / raw)
  To: guile-user

Hello,

Neil Jerram <neil@ossau.uklinux.net> writes:

> That is fundamentally true; however, we have recently addressed some
> genuine Valgrind warnings in the 1.8.x development branch.

These were Helgrind warnings, not Memcheck warnings, right?

There's a suppression file there:

  http://www.mail-archive.com/guile-devel@gnu.org/msg00743.html

If it happens to work well, maybe we could ship it with the next 1.8
release.

Thanks,
Ludo'.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Valgrind warnings with -1.8.6
  2009-04-08  7:36       ` Ludovic Courtès
@ 2009-04-08 13:38         ` Paul Emsley
  2009-04-12  7:11         ` Neil Jerram
  1 sibling, 0 replies; 10+ messages in thread
From: Paul Emsley @ 2009-04-08 13:38 UTC (permalink / raw)
  To: guile-user

Ludovic Courtès wrote:
> Hello,
>
> Neil Jerram <neil@ossau.uklinux.net> writes:
>
>   
>> That is fundamentally true; however, we have recently addressed some
>> genuine Valgrind warnings in the 1.8.x development branch.
>>     
>
> These were Helgrind warnings, not Memcheck warnings, right?
>
> There's a suppression file there:
>
>   http://www.mail-archive.com/guile-devel@gnu.org/msg00743.html
>
> If it happens to work well, maybe we could ship it with the next 1.8
> release.
>   

More suppressions:

http://coot.googlecode.com/svn/trunk/guile.supp

(I don't know if they are useful - and may be specific cases of above).

Paul.






^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Valgrind warnings with -1.8.6
  2009-04-08  7:36       ` Ludovic Courtès
  2009-04-08 13:38         ` Paul Emsley
@ 2009-04-12  7:11         ` Neil Jerram
  1 sibling, 0 replies; 10+ messages in thread
From: Neil Jerram @ 2009-04-12  7:11 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-user

ludo@gnu.org (Ludovic Courtès) writes:

> Hello,
>
> Neil Jerram <neil@ossau.uklinux.net> writes:
>
>> That is fundamentally true; however, we have recently addressed some
>> genuine Valgrind warnings in the 1.8.x development branch.
>
> These were Helgrind warnings, not Memcheck warnings, right?

Yes, good point!

     Neil




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Valgrind warnings with -1.8.6
  2009-04-06 15:05 Valgrind warnings with -1.8.6 Andrew Gaylard
  2009-04-07 10:40 ` Andrew Gaylard
@ 2009-04-30  9:12 ` Andrew Gaylard
  2009-04-30 21:09   ` Ludovic Courtès
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Gaylard @ 2009-04-30  9:12 UTC (permalink / raw)
  To: guile-user

On Mon, Apr 6, 2009 at 5:05 PM, Andrew Gaylard <ag@computer.org> wrote:
> Hi,
>
> I'm linking with libguile on Linux, built from source, to extend my
> C application with Scheme. I'm seeing a lot of warnings from
> valgrind.  The same warnings appear when using Guile standalone.
> Should I be worried?

After some digging, I'm a bit closer.  Building from today's git
shows fewer problems:

grep '^==[0-9]*== [a-zA-Z]' ./hello-world.vg |
awk '/FILE DESCRIPTORS/ {x=0} x==1 {print} /My PID/ {x=1}' |
 sort | uniq -c
     25 ==3551== Conditional jump or move depends on uninitialised value(s)
     15 ==3551== Use of uninitialised value of size 4
      1 ==3551== Warning: bad signal number 0 in sigaction()

Also, something that may or may not be related...
I've seen that a build without optimisation, i.e.:

make distclean ; ./autogen.sh ; CFLAGS=-g ./configure ;  make

fails like this:

make[2]: Entering directory `/home/apg/tmp/guile-git/guile/module'
/bin/mkdir -p `dirname ice-9/psyntax-pp.go`
../meta/uninstalled-env guile-tools compile -o "ice-9/psyntax-pp.go"
"ice-9/psyntax-pp.scm"
ERROR: Stack overflow
make[2]: *** [ice-9/psyntax-pp.go] Error 1

But doing the same without specifying the CFLAGS
(i.e. using the default CFLAGS  of "-g -O2") builds fine:

make distclean ; ./autogen.sh ; ./configure ;  make

(This is on Linux (Ubuntu-8.04).)

- Andrew




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Valgrind warnings with -1.8.6
  2009-04-30  9:12 ` Andrew Gaylard
@ 2009-04-30 21:09   ` Ludovic Courtès
  2009-05-01 10:13     ` Andy Wingo
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2009-04-30 21:09 UTC (permalink / raw)
  To: guile-user

Hello,

Andrew Gaylard <ag@computer.org> writes:

> After some digging, I'm a bit closer.  Building from today's git
> shows fewer problems:

You're referring to `master', right?

> grep '^==[0-9]*== [a-zA-Z]' ./hello-world.vg |
> awk '/FILE DESCRIPTORS/ {x=0} x==1 {print} /My PID/ {x=1}' |
>  sort | uniq -c
>      25 ==3551== Conditional jump or move depends on uninitialised value(s)
>      15 ==3551== Use of uninitialised value of size 4
>       1 ==3551== Warning: bad signal number 0 in sigaction()

Cool.

> I've seen that a build without optimisation, i.e.:

That is expected: the evaluator and/or bytecode interpreter eat up too
much stack space with `-O0'.

Thanks,
Ludo'.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Valgrind warnings with -1.8.6
  2009-04-30 21:09   ` Ludovic Courtès
@ 2009-05-01 10:13     ` Andy Wingo
  0 siblings, 0 replies; 10+ messages in thread
From: Andy Wingo @ 2009-05-01 10:13 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-user

On Thu 30 Apr 2009 23:09, ludo@gnu.org (Ludovic Courtès) writes:

> Andrew Gaylard <ag@computer.org> writes:
>
>> I've seen that a build without optimisation, i.e.:
>
> That is expected: the evaluator and/or bytecode interpreter eat up too
> much stack space with `-O0'.

Actually I didn't expect that, after the recent getrlimit changes.
Perhaps we revert to building psyntax-pp.go after the compiler is
expanded.

Cheers,

Andy
-- 
http://wingolog.org/




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-05-01 10:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-06 15:05 Valgrind warnings with -1.8.6 Andrew Gaylard
2009-04-07 10:40 ` Andrew Gaylard
2009-04-07 19:47   ` Andreas Rottmann
2009-04-07 21:25     ` Neil Jerram
2009-04-08  7:36       ` Ludovic Courtès
2009-04-08 13:38         ` Paul Emsley
2009-04-12  7:11         ` Neil Jerram
2009-04-30  9:12 ` Andrew Gaylard
2009-04-30 21:09   ` Ludovic Courtès
2009-05-01 10:13     ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).