GNU bug report logs -
#37385
27.0.50; Crash on multibyte assertion violation
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Wed, 11 Sep 2019 20:33:01 UTC
Severity: normal
Found in version 27.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> I tried the following fix and it prevents the crash:
>
> Thanks, but this is a backward-incompatible change on too low a level.
> It is a long-standing "convention" in Emacs that Lisp strings rendered
> as part of, or in relation to, unibyte buffers are assumed unibyte by
> default, and I don't want to change that -- who knows how many places
> in the code rely on this implicit assumption?
>
> Also, the change in reseat_1 looks unnecessary, as I'd be surprised if
> that function was called in your use case (reseat_1 is used only when
> displaying buffers, not strings).
>
> Please try an alternative patch below. (I don't have access to an X
> build without a toolkit, so I cannot test this myself.)
Thanks for the proper fix. I tried and it works without problems.
Also I found third place (in addition to two places in your patch)
where STRING_MULTIBYTE could be used for reseat_to_string. Is the
following change needed as well?
diff --git a/src/xdisp.c b/src/xdisp.c
index 9f999c7903..af6faf9d34 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13804,7 +13812,8 @@ tool_bar_height (struct frame *f, int *n_rows, bool pixelwise)
temp_row->reversed_p = false;
it.first_visible_x = 0;
it.last_visible_x = WINDOW_PIXEL_WIDTH (w);
- reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1);
+ reseat_to_string (&it, NULL, f->desired_tool_bar_string,
+ 0, 0, 0, STRING_MULTIBYTE (f->desired_tool_bar_string));
it.paragraph_embedding = L2R;
while (!ITERATOR_AT_END_P (&it))
This bug report was last modified 5 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.