lilypond-devel
[Top][All Lists]
Advanced

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

Re: Uses derived_mark to avoid segfault (issue 5729051)


From: dak
Subject: Re: Uses derived_mark to avoid segfault (issue 5729051)
Date: Sun, 04 Mar 2012 07:26:30 +0000


http://codereview.appspot.com/5729051/diff/1001/lily/span-bar-stub-engraver.cc
File lily/span-bar-stub-engraver.cc (right):

http://codereview.appspot.com/5729051/diff/1001/lily/span-bar-stub-engraver.cc#newcode71
lily/span-bar-stub-engraver.cc:71: axis_groups_ = scm_cons (scm_cons
(i.grob ()->self_scm (), i.context ()->self_scm ()), axis_groups_);
axis_groups_ never gets cleared out again: this keeps grobs and contexts
alive at least until the engraver is collected.

http://codereview.appspot.com/5729051/diff/1001/lily/span-bar-stub-engraver.cc#newcode81
lily/span-bar-stub-engraver.cc:81: if (!vertical_alignment) // we are at
the beginning of a score, so no need for stubs
If "we are at the beginning of the score" is a valid state here,
scm_caar (axis_groups_) is likely to throw an exception.

http://codereview.appspot.com/5729051/diff/1001/lily/span-bar-stub-engraver.cc#newcode127
lily/span-bar-stub-engraver.cc:127: for (vsize j = 0; j <
affected_contexts.size (); j++)
While you are at it: how about throwing out all of the reverses and
instead letting the loop run backwards?

http://codereview.appspot.com/5729051/



reply via email to

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