lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug reports for valgrind warnings?


From: Reinhold Kainhofer
Subject: Re: bug reports for valgrind warnings?
Date: Wed, 24 Aug 2011 19:43:35 +0200
User-agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; i686; ; )

Am Mittwoch, 24. August 2011, 18:18:33 schrieben Sie:
> On Wed, Aug 24, 2011 at 02:08:41PM +0200, Reinhold Kainhofer wrote:
> > Shall I open a bug report for each regtest where valgrind shows a warning
> > (the guile GC warnings are of course filtered out using a suppressions
> > file)?
> 
> I wouldn't be surprised if you get some duplicate bugs, though --
> I mean, if there was one line in the slur code that produced a
> memory error, I'd expect it to show up in dozens of regtests.

You'd be surprised: With the --disable-optimising configure option, there are 
basically just two relevant warnings!

One in grid-lines.ly and one in laissez-vibrer-tie-beam.ly. I'm attaching my 
suppressions file and the output of valgrind.

I have the following alias in my ~/.bashrc (or rather in ~/.aliases, which I 
source from .bashrc):
alias valgrind-ly='valgrind --trace-children=yes --
suppressions=/home/reinhold/lilypond/guile_supp --track-origins=yes --num-
callers=25 lilypond '

Then call valgrind in input/regression/ as:
valgrind-ly grid-lines.ly laissez-vibrer-tie-beam.ly



There is, however, one caveat with the suppressions: Some uninitialized 
variables might be handled to guile (e.g. scm_from_int) and they will only 
show up as uninitialized variables in the garbage collection handling.

The (suppressed) output would then look something like:
»mozart-hrn-3.ly« wird verarbeitet
[...]
==14418== Use of uninitialised value of size 4
==14418==    at 0x827C877: Stencil::mark_smob(scm_unused_struct*) 
(stencil.cc:54)
==14418==    by 0x409F48B: scm_gc_mark (in /usr/lib/libguile.so.17.3.1)
==14418==    by 0x409F639: scm_mark_locations (in /usr/lib/libguile.so.17.3.1)
==14418==    by 0x40F6001: scm_threads_mark_stacks (in 
/usr/lib/libguile.so.17.3.1)
[...]
Text_interface::interpret_string(scm_unused_struct*, scm_unused_struct*, 
scm_unused_struct*) (text-interface.cc:64)
==14418==    by 0x8290045: 
Text_interface::interpret_markup(scm_unused_struct*, scm_unused_struct*, 
scm_unused_struct*) (text-interface.cc:95)
[...]
==14418==  Uninitialised value was created by a stack allocation
==14418==    at 0x828FA36: 
Text_interface::interpret_string(scm_unused_struct*, scm_unused_struct*, 
scm_unused_struct*) (text-interface.cc:58)

I don't see whether in this case where are some uninitialized values in the 
lilypond code, though.


Such a case were the uninitialized variables that I fixed yesterday, which 
were immediately passed to scm_from_int and triggered the warning only in the 
GC. Unfortunately, most warnings in the GC are really from guile.



An optimized build basically gives basically the same warnings.

Cheers,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

Attachment: guile_supp
Description: Text document

Attachment: valgrind.no-optimisation
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]