GNU bug report logs -
#35273
"Marker does not point anywhere" when reading next article
Previous Next
Reported by: Leah Neukirchen <leah <at> vuxu.org>
Date: Sun, 14 Apr 2019 15:59:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 5.13
Fixed in version 26.3
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Noam Postavsky <npostavs <at> gmail.com> writes:
>> (gdb) bt
>> #0 marker_position (marker=XIL(0x5555578a47c5)) at marker.c:680
>> #1 0x00005555556fc2dd in mouse_face_overlay_overlaps (
>> overlay=XIL(0x5555578a4825)) at buffer.c:3047
>> #2 0x0000555555606f5f in note_mouse_highlight (f=0x55555610dbf0, x=100, y=9)
>> at xdisp.c:31631
>
>> (gdb) up
>> #1 0x00005555556fc2dd in mouse_face_overlay_overlaps (
>> overlay=XIL(0x5555578a4825)) at buffer.c:3047
>> 3047 ptrdiff_t start = OVERLAY_POSITION (OVERLAY_START (overlay));
>> (gdb) l
>> 3042 `mouse-face' property overlapping OVERLAY. */
>> 3043
>> 3044 bool
>> 3045 mouse_face_overlay_overlaps (Lisp_Object overlay)
>> 3046 {
>> 3047 ptrdiff_t start = OVERLAY_POSITION (OVERLAY_START (overlay));
>> 3048 ptrdiff_t end = OVERLAY_POSITION (OVERLAY_END (overlay));
>
> Oh right, OVERLAY_POSITION calls marker_position. I think the patch
> below should paper over the problem, but I'm not sure if it's the right
> thing.
>
> --- i/src/buffer.c
> +++ w/src/buffer.c
> @@ -3044,8 +3044,13 @@ overlays_in (EMACS_INT beg, EMACS_INT end, bool extend,
> bool
> mouse_face_overlay_overlaps (Lisp_Object overlay)
> {
> - ptrdiff_t start = OVERLAY_POSITION (OVERLAY_START (overlay));
> - ptrdiff_t end = OVERLAY_POSITION (OVERLAY_END (overlay));
> + Lisp_Object start_pos = Fmarker_position (OVERLAY_START (overlay));
> + Lisp_Object end_pos = Fmarker_position (OVERLAY_END (overlay));
> + if (!(INTEGERP (start_pos) && INTEGERP (end_pos)))
> + return false;
> + intmax_t start, end;
> + integer_to_intmax (start_pos, &start);
> + integer_to_intmax (end_pos, &end);
> ptrdiff_t n, i, size;
> Lisp_Object *v, tem;
> Lisp_Object vbuf[10];
>
I cannot reproduce the error anymore after applying the patch.
Thanks,
--
Leah Neukirchen <leah <at> vuxu.org> http://leah.zone
This bug report was last modified 6 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.