[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixes segfault in beam quanting. (issue4339047)
From: |
Han-Wen Nienhuys |
Subject: |
Re: Fixes segfault in beam quanting. (issue4339047) |
Date: |
Mon, 4 Apr 2011 00:37:33 -0300 |
On Mon, Apr 4, 2011 at 12:22 AM, Werner LEMBERG <address@hidden> wrote:
>
>> LilyPond exposes large parts of the internal implementation through
>> the Scheme interface, and that has as a side-effect that there are
>> many ways for users to break lilypond. This is unlikely to lead to
>> arbitrary behavior, as Guile values themselves themselves are type
>> tagged. 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.
* unsmob_grob(x)->foo()
If x is not a grob, unsmob_grob(x) returns NULL. Boom.
>> I don't think it is productive to try to systematically plug all
>> these errors; at best, you'll replace a bunch of segmentation faults
>> with just as unhelpful assertion failures.
>
> I definitely prefer assertions to segfaults. But maybe that's only
> me.
It does not make any difference: you'll need to start up a debugger to
figure what's going on in either case.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
- Re: Fixes segfault in beam quanting. (issue4339047), (continued)
- Re: Fixes segfault in beam quanting. (issue4339047), Graham Percival, 2011/04/02
- Re: Fixes segfault in beam quanting. (issue4339047), Werner LEMBERG, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), Trevor Daniels, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), Graham Percival, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), Werner LEMBERG, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), address@hidden, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), Trevor Daniels, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), Han-Wen Nienhuys, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), Werner LEMBERG, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), Graham Percival, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047),
Han-Wen Nienhuys <=
- Re: Fixes segfault in beam quanting. (issue4339047), Werner LEMBERG, 2011/04/03
- Re: Fixes segfault in beam quanting. (issue4339047), Han-Wen Nienhuys, 2011/04/04
- Re: Fixes segfault in beam quanting. (issue4339047), Trevor Daniels, 2011/04/04
- Re: Fixes segfault in beam quanting. (issue4339047), address@hidden, 2011/04/04
Re: Fixes segfault in beam quanting. (issue4339047), percival . music . ca, 2011/04/02
Re: Fixes segfault in beam quanting. (issue4339047), mtsolo, 2011/04/02
Re: Fixes segfault in beam quanting. (issue4339047), hanwenn, 2011/04/04