lilypond-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix crash when a stencil routine is missing


From: Patrick McCarty
Subject: Re: [PATCH] Fix crash when a stencil routine is missing
Date: Fri, 26 Jun 2009 13:46:03 -0700

On Sat, Jun 20, 2009 at 11:55 AM, Patrick McCarty<address@hidden> wrote:
> Hello,
>
> I have uploaded a patch to Rietveld:
>
> http://codereview.appspot.com/83046/show

Does anyone have comments for this patch?

Here are some more thoughts I have about this:

***

The problematic function that causes the crash is in lily/paper-outputter.cc:

  SCM
  Paper_outputter::scheme_to_string (SCM scm)
  {
    return scm_eval (scm, output_module_);
  }

Every stencil routine (besides the ones in lily/stencil-interpret.cc)
is evaluated in output-**.scm directly.  The only safeguard against
invalid stencil routines is the registration process that happens in
scm/define-stencil-commands.scm.

I guess the basic question is:  should a LilyPond file with a valid
(but undefined) stencil routine successfully compile?  If so, then my
patch provides one possible solution.

If LilyPond should instead halt with an error message, how should this
be implemented?  Is there a "safe" way to do scm_eval so that it
returns SCM_BOOL_F if there is no valid binding in the module?


Thanks,
Patrick




reply via email to

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