Subject: Re: bug#39207: WITH dgb symbols Re: bug#39207: 28.0.50; crash when sending gnus message

From: Robert Pluim <[email-masked]>
Date: Wed, 22 Jan 2020 13:12:54 +0100

Please keep [email-masked] in CC, rather than replying direct only
to me.

>>>>> On Wed, 22 Jan 2020 10:09:54 +0100, Gĳs Hillenius <[email-masked]> said:

    Gĳs> Hi Robert,
    Gĳs> ,----
    Gĳs> | (setq gnus-expirable-mark ?♻)
    Gĳs> | (setq gnus-read-mark ?✓) ;; trips up Gnus
    Gĳs> | (setq gnus-ticked-mark ?⚑)
    Gĳs> | (setq gnus-unread-mark ?✉)
    Gĳs> | (setq gnus-del-mark ?✗)
    Gĳs> | (setq gnus-killed-mark ?☠)
    Gĳs> | (setq gnus-replied-mark ?⟲)
    Gĳs> | (setq gnus-forwarded-mark ?⤳)
    Gĳs> `----

    Gĳs> So, if I load them one by one, it seems to be the ✓ that trips up
    Gĳs> Gnus. It was already the 2nd.

    Gĳs> I then restarted emacs-snapshot-x in the gdb, and tested the remaining
    Gĳs> 6, adding them one-by-one, and then, lastly also evaluated the 1st,
    Gĳs> gnus-expirable-mark.

    Gĳs> At this point, I drafted an email to you, and saved it.

    Gĳs> So, when I load 1 *and* 3 - 8, Gnus seems to work just fine. I'm testing
    Gĳs> this by going into a mail group, selecting the first message in a email
    Gĳs> back and forth conversation , and then entering the replies one by one.

    Gĳs> But, once I load the tickmark, Gnus trips up. I can enter the group,
    Gĳs> scroll to the first message, and select this. I can't select any message
    Gĳs> below that point (using either the arrow or C-n): point will jump back
    Gĳs> to the random message. And, all the messages in the thread turn 'green',
    Gĳs> the point jumps to a random (unsure if it is random) earlier message in
    Gĳs> the Group.

    Gĳs> What's more, when I then 'reset' the gnus-read-mark to R, exit the
    Gĳs> group, go into the draft folder, and want to finish a draft of this
    Gĳs> email to you, emacs-snapshot seems to recieve SIGABRT; the screen
    Gĳs> becomes unresponsive and I can see the (gdb) prompt.

    Gĳs> bt is attached

    Gĳs> Does this narrow things down?

Yes, thanks. I can get a crash with that recipe.

Eli, the abort in Gijs' backtrace is coming from

  if (ch < 0 || ch > MAX_CHAR)
    emacs_abort ();

in bidi.c

but when I run his recipe I get:

#0  0x000055555575ace4 in terminate_due_to_signal (sig=6, backtrace_limit=40)
    at emacs.c:371
#1  0x000055555579547f in emacs_abort () at sysdep.c:2448
#2  0x00005555555f8dd2 in redisplay_window
    (window=XIL(0x555556357b55), just_this_one_p=true) at xdisp.c:18071
#3  0x00005555555f306b in redisplay_window_1 (window=XIL(0x555556357b55))
    at xdisp.c:16202
#4  0x00005555558825c0 in internal_condition_case_1
    (bfun=0x5555555f3029 <redisplay_window_1>, arg=XIL(0x555556357b55), handlers=XIL(0x7ffff190e963), hfun=0x5555555f2fa3 <redisplay_window_error>)
    at eval.c:1379
#5  0x00005555555f239e in redisplay_internal () at xdisp.c:15770
#6  0x00005555555f0265 in redisplay () at xdisp.c:14869
#7  0x0000555555768b9c in read_char
    (commandflag=1, map=XIL(0x555557d3fd33), prev_event=XIL(0), used_mouse_menu=0x7fffffffdb4f, end_time=0x0) at keyboard.c:2493
#8  0x0000555555777d71 in read_key_sequence
    (keybuf=0x7fffffffdd50, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false)
    at keyboard.c:9553
#9  0x0000555555765d14 in command_loop_1 () at keyboard.c:1350
#10 0x0000555555882519 in internal_condition_case
    (bfun=0x5555557658ce <command_loop_1>, handlers=XIL(0x90), hfun=0x555555765064 <cmd_error>) at eval.c:1355
#11 0x0000555555765593 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091
#12 0x0000555555881dce in internal_catch
    (tag=XIL(0xd110), func=0x555555765566 <command_loop_2>, arg=XIL(0))
    at eval.c:1116
#13 0x0000555555765531 in command_loop () at keyboard.c:1070
#14 0x0000555555764c33 in recursive_edit_1 () at keyboard.c:714
#15 0x0000555555764db7 in Frecursive_edit () at keyboard.c:786
#16 0x000055555575d456 in main (argc=1, argv=0x7fffffffe228) at emacs.c:2054

18068     /* Some sanity checks.  */
18069     CHECK_WINDOW_END (w);
18070     if (Z == Z_BYTE && CHARPOS (opoint) != BYTEPOS (opoint))
18071       emacs_abort ();
18072     if (BYTEPOS (opoint) < CHARPOS (opoint))
18073       emacs_abort ();
18074
18075     if (mode_line_update_needed (w))
(gdb) p Z
$1 = 2804
(gdb) p Z_BYTE
$2 = 2804
(gdb) p CHARPOS(opoint)
$3 = 495
(gdb) p BYTEPOS(opoint)
$4 = 497

Gijs' backtrace:

    Gĳs> Thread 1 "emacs-snapshot-" received signal SIGABRT, Aborted.
    Gĳs> raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
    Gĳs> 50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    Gĳs> (gdb) bt
    Gĳs> #0  raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
    Gĳs> #1  0x0000555555597eb0 in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:401
    Gĳs> #2  0x000055555559836e in emacs_abort () at sysdep.c:2448
    Gĳs> #3  0x00005555555969f0 in bidi_get_type (ch=<optimized out>, override=<optimized out>) at bidi.c:282
    Gĳs> #4  0x0000555555635547 in bidi_resolve_explicit (bidi_it=0x7fffffff7750) at bidi.c:2019
    Gĳs> #5  0x0000555555635d0f in bidi_resolve_weak (bidi_it=0x7fffffff7750) at bidi.c:2175
    Gĳs> #6  0x0000555555636fbb in bidi_resolve_brackets (bidi_it=0x7fffffff7750) at bidi.c:2839
    Gĳs> #7  0x000055555563739b in bidi_resolve_neutral (bidi_it=0x7fffffff7750) at bidi.c:2957
    Gĳs> #8  0x00005555556378cf in bidi_type_of_next_char (bidi_it=0x7fffffff7750) at bidi.c:3162
    Gĳs> #9  bidi_level_of_next_char (bidi_it=0x7fffffff7750) at bidi.c:3229
    Gĳs> #10 0x0000555555638840 in bidi_move_to_visually_next (bidi_it=bidi_it@entry=0x7fffffff7750) at bidi.c:3422
    Gĳs> #11 0x00005555555cefaf in set_iterator_to_next (it=0x7fffffff6d60, reseat_p=<optimized out>) at xdisp.c:7805
    Gĳs> #12 0x00005555555cf24c in set_iterator_to_next (it=0x7fffffff6d60, reseat_p=<optimized out>) at xdisp.c:7877
    Gĳs> #13 0x00005555555d6216 in display_line (it=0x7fffffff6d60, cursor_vpos=<optimized out>) at xdisp.c:23573
    Gĳs> #14 0x00005555555db8e9 in try_window (window=window@entry=0x55555a5d4de5, pos=..., flags=flags@entry=1) at xdisp.c:19062
    Gĳs> #15 0x00005555555f05b8 in redisplay_window (window=0x55555a5d4de5, just_this_one_p=<optimized out>) at xdisp.c:18480
    Gĳs> #16 0x00005555555f377b in redisplay_window_0 (window=window@entry=0x55555a5d4de5) at xdisp.c:16194
    Gĳs> #17 0x00005555556f6dfa in internal_condition_case_1
    Gĳs> (bfun=bfun@entry=0x5555555f3750 <redisplay_window_0>,
    Gĳs> arg=arg@entry=0x55555a5d4de5, handlers=<optimized out>,
    Gĳs>     hfun=hfun@entry=0x5555555b3f20 <redisplay_window_error>) at eval.c:1379
    Gĳs> #18 0x00005555555bd838 in redisplay_windows (window=0x55555a5d4de5) at xdisp.c:16174
    Gĳs> #19 0x00005555555bd80d in redisplay_windows (window=0x55555abd4c85) at xdisp.c:16168
    Gĳs> #20 0x00005555555df37f in redisplay_internal () at xdisp.c:15642
    Gĳs> #21 0x000055555568943f in read_char (commandflag=1,
    Gĳs> map=0x55555a6066f3, prev_event=0x0, used_mouse_menu=0x7fffffffc36b,
    Gĳs> end_time=0x0) at keyboard.c:2493
    Gĳs> #22 0x000055555568bf5d in read_key_sequence (keybuf=<optimized out>,
    Gĳs> prompt=0x0, dont_downcase_last=<optimized out>,
    Gĳs> can_return_switch_frame=true, fix_current_buffer=true,
    Gĳs> prevent_redisplay=<optimized out>)
    Gĳs>     at keyboard.c:9553
    Gĳs> #23 0x000055555568d74c in command_loop_1 () at lisp.h:1032
    Gĳs> #24 0x00005555556f6d76 in internal_condition_case
    Gĳs> (bfun=bfun@entry=0x55555568d560 <command_loop_1>,
    Gĳs> handlers=handlers@entry=0x90, hfun=hfun@entry=0x555555683f50
    Gĳs> <cmd_error>) at eval.c:1355
    Gĳs> #25 0x000055555567e7a4 in command_loop_2 (ignore=ignore@entry=0x0) at lisp.h:1032
    Gĳs> #26 0x00005555556f6ccf in internal_catch (tag=tag@entry=0x59d0, func=func@entry=0x55555567e780 <command_loop_2>, arg=arg@entry=0x0) at eval.c:1116
    Gĳs> #27 0x000055555567e6fd in command_loop () at lisp.h:1032
    Gĳs> #28 0x0000555555683b3f in recursive_edit_1 () at keyboard.c:714
    Gĳs> #29 0x0000555555683e7b in Frecursive_edit () at keyboard.c:786
    Gĳs> #30 0x00005555556f7ae1 in Ffuncall (nargs=1, args=args@entry=0x7fffffffc808) at lisp.h:2109
    Gĳs> #31 0x000055555572e2c8 in exec_byte_code (bytestr=<optimized out>,
    Gĳs> vector=<optimized out>, maxdepth=<optimized out>,
    Gĳs> args_template=<optimized out>, nargs=<optimized out>, args=<optimized
    out> ) at bytecode.c:633
    Gĳs> #32 0x00005555556f7a3d in Ffuncall (nargs=3, args=0x7fffffffcd10) at eval.c:2808
    Gĳs> #33 0x00005555556f7dd2 in Fapply (nargs=nargs@entry=2, args=args@entry=0x7fffffffcdb0) at eval.c:2424
    Gĳs> #34 0x00005555556f7f4a in apply1 (fn=<optimized out>, arg=arg@entry=0x555558687fa3) at lisp.h:1399
    Gĳs> #35 0x00005555556f8100 in call_debugger (arg=0x555558687fa3) at eval.c:339
    Gĳs> #36 0x00005555556f8713 in maybe_call_debugger (data=0x555558688013, sig=0xe9d0, conditions=0x7ffff1be007b) at lisp.h:1032
    Gĳs> #37 signal_or_quit (error_symbol=0xe9d0, data=0x555558688013, keyboard_quit=<optimized out>) at eval.c:1666
    Gĳs> #38 0x000055555559a5f0 in Fsignal (error_symbol=<optimized out>, error_symbol@entry=0xe9d0, data=<optimized out>) at eval.c:1568
    Gĳs> #39 0x000055555559a7ca in xsignal (data=<optimized out>, error_symbol=0xe9d0) at lisp.h:4140
    Gĳs> #40 xsignal2 (error_symbol=error_symbol@entry=0xe9d0, arg1=arg1@entry=0xc8a0, arg2=arg2@entry=0x14a) at eval.c:1713
    Gĳs> #41 0x00005555555997f9 in wrong_type_argument (predicate=predicate@entry=0xc8a0, value=value@entry=0x14a) at lisp.h:1032
    Gĳs> #42 0x0000555555599e07 in CHECK_TYPE (x=0x14a, predicate=0xc8a0, ok=0) at data.c:1991
    Gĳs> #43 CHECK_SYMBOL (x=0x14a) at lisp.h:1052
    Gĳs> #44 set_internal (symbol=0x14a, newval=<optimized out>, where=<optimized out>, bindflag=<optimized out>) at data.c:1307
    Gĳs> #45 0x00005555556e70c6 in Fset (symbol=<optimized out>, newval=0x9c4e) at lisp.h:1032
    Gĳs> #46 0x00005555556f9bd1 in eval_sub (form=<optimized out>) at lisp.h:2109
    Gĳs> #47 0x00005555556fb5ea in Feval (form=0x5555586882f3, lexical=<optimized out>) at eval.c:2102
    Gĳs> #48 0x00005555556f7ae1 in Ffuncall (nargs=3, args=args@entry=0x7fffffffd108) at lisp.h:2109
    Gĳs> #49 0x000055555572e2c8 in exec_byte_code (bytestr=<optimized out>,
    Gĳs> vector=<optimized out>, maxdepth=<optimized out>,
    Gĳs> args_template=<optimized out>, nargs=<optimized out>, args=<optimized
    out> ) at bytecode.c:633
    Gĳs> #50 0x00005555556f7a3d in Ffuncall (nargs=2, args=args@entry=0x7fffffffd430) at eval.c:2808
    Gĳs> #51 0x000055555572e2c8 in exec_byte_code (bytestr=<optimized out>,
    Gĳs> vector=<optimized out>, maxdepth=<optimized out>,
    Gĳs> args_template=<optimized out>, nargs=<optimized out>, args=<optimized
    out> ) at bytecode.c:633
    Gĳs> #52 0x00005555556f7a3d in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7fffffffd7c8) at eval.c:2808
    Gĳs> --Type <RET> for more, q to quit, c to continue without paging--
    Gĳs> #53 0x00005555556f43da in Ffuncall_interactively (nargs=2, args=0x7fffffffd7c8) at callint.c:254
    Gĳs> #54 0x00005555556f7ae1 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x7fffffffd7c0) at lisp.h:2109
    Gĳs> #55 0x00005555556f56b6 in Fcall_interactively (function=0x2aaa9bc5bd90, record_flag=0x0, keys=0x55555a7228a5) at callint.c:783
    Gĳs> #56 0x00005555556f7ae1 in Ffuncall (nargs=4, args=args@entry=0x7fffffffd9d8) at lisp.h:2109
    Gĳs> #57 0x000055555572e2c8 in exec_byte_code (bytestr=<optimized out>,
    Gĳs> vector=<optimized out>, maxdepth=<optimized out>,
    Gĳs> args_template=<optimized out>, nargs=<optimized out>, args=<optimized
    out> ) at bytecode.c:633
    Gĳs> #58 0x00005555556f7a3d in Ffuncall (nargs=2, args=0x7fffffffdd70) at eval.c:2808
    Gĳs> #59 0x00005555556f7b9d in call1 (fn=fn@entry=0x41a0, arg1=<optimized out>) at eval.c:2654
    Gĳs> #60 0x000055555568d94b in command_loop_1 () at lisp.h:1032
    Gĳs> #61 0x00005555556f6d76 in internal_condition_case
    Gĳs> (bfun=bfun@entry=0x55555568d560 <command_loop_1>,
    Gĳs> handlers=handlers@entry=0x90, hfun=hfun@entry=0x555555683f50
    Gĳs> <cmd_error>) at eval.c:1355
    Gĳs> #62 0x000055555567e7a4 in command_loop_2 (ignore=ignore@entry=0x0) at lisp.h:1032
    Gĳs> #63 0x00005555556f6ccf in internal_catch (tag=tag@entry=0xd110, func=func@entry=0x55555567e780 <command_loop_2>, arg=arg@entry=0x0) at eval.c:1116
    Gĳs> #64 0x000055555567e743 in command_loop () at lisp.h:1032
    Gĳs> #65 0x0000555555683b3f in recursive_edit_1 () at keyboard.c:714
    Gĳs> #66 0x0000555555683e7b in Frecursive_edit () at keyboard.c:786
    Gĳs> #67 0x000055555559ec58 in main (argc=2, argv=<optimized out>) at emacs.c:2054
    Gĳs> (gdb)