lilypond-devel
[Top][All Lists]
Advanced

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

Re: Fixes segfault in beam quanting. (issue4339047)


From: Werner LEMBERG
Subject: Re: Fixes segfault in beam quanting. (issue4339047)
Date: Mon, 04 Apr 2011 05:43:40 +0200 (CEST)

>>> The worst which can happen is that a value is incorrectly
>>> type-cast which leads to either a null dereference or some other
>>> type assertion.
>>
>> Could you give a Scheme example for that, please?
>
> Typical examples:
>
> * scm_cdr(SCM_EOL)
>
> This basically dereferences an (almost) null pointer.  Possibly,
> this crashes neatly in debug mode (I'm not sure).  The SCM_CDR()
> variant will surely crash with segmentation fault.

There is a misunderstanding.  I was rather talking about Scheme code
entered by the user.  The above is a programming error, isn't it?

> * unsmob_grob(x)->foo()
>
> If x is not a grob, unsmob_grob(x) returns NULL. Boom.

This looks like a programming error too...

I don't understand why you think that such situations shouldn't be
fixed in the source code.


    Werner



reply via email to

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