Jean Abou Samra <j...@abou-samra.fr> writes:

> Le 30/12/2021 à 23:04, Lukas-Fabian Moser a écrit :
>> Hi Jean,
>>
>>>
>>> Both of these cases seem to work the same as in
>>> current versions if I do
>>>
>>> [...]
>>>
>>>  SCM
>>>  assq_tail (SCM key, SCM alist, SCM based_on = SCM_EOL)
>>>  {
>>> -  for (SCM p = alist; !scm_is_eq (p, based_on); p = scm_cdr (p))
>>> +  for (SCM p = alist; scm_is_pair (p) && scm_is_pair (scm_car (p))
>>> && !scm_is_eq (p, based_on); p = scm_cdr (p))
>>>      {
>>>        if (scm_is_eq (scm_caar (p), key))
>>>          return p;
>>
>> Thanks! This seems to be a sensible precaution anyway, as it only
>> changes a certain crash into returning #f. So it might be sensible
>> to make this change anyway?
>
>
> Turns out that you can already trigger the
> crash in current versions with
>
> \version "2.23.5"
>
> x = 0
> x.y.z = 1

That's not what I call a crash.  That triggers a Scheme error.

lilypond /tmp/bab.ly
GNU LilyPond 2.23.5 (running Guile 1.8)
Processing `/tmp/bab.ly'
Parsing.../usr/local/share/lilypond/2.23.5/scm/lily/lily.scm:978:21: In 
procedure ly:parse-file in expression (ly:parse-file file-name):
/usr/local/share/lilypond/2.23.5/scm/lily/lily.scm:978:21: Wrong type 
(expecting pair): 0

And frankly, I don't see something wrong with that.  Could use a better
error locator, sure.  But it's not the same as a core dump.

-- 
David Kastrup

Reply via email to