From: Eli Zaretskii <eliz@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
Cc: 39207@debbugs.gnu.org, gijs@hillenius.net
Subject: bug#39207: WITH dgb symbols Re: bug#39207: 28.0.50; crash when sending gnus message
Date: Wed, 22 Jan 2020 18:13:44 +0200 [thread overview]
Message-ID: <83a76fv58n.fsf@gnu.org> (raw)
In-Reply-To: <m2zhefofjt.fsf@gmail.com> (message from Robert Pluim on Wed, 22 Jan 2020 13:12:54 +0100)
> Date: Wed, 22 Jan 2020 13:12:54 +0100
> Cc: 39207@debbugs.gnu.org
>
> Eli, the abort in Gijs' backtrace is coming from
>
> if (ch < 0 || ch > MAX_CHAR)
> emacs_abort ();
>
> in bidi.c
I need to see the value of 'ch' in this case. It's "optimized out" (a
euphemism for "GDB is confused") in Gijs' backtrace, but if one goes up
the call-stack, one should be able to see it in, say, frame #4:
> Gijs> #4 0x0000555555635547 in bidi_resolve_explicit (bidi_it=0x7fffffff7750) at bidi.c:2019
as bidi_it->ch.
Also...
> Gijs> #35 0x00005555556f8100 in call_debugger (arg=0x555558687fa3) at eval.c:339
> Gijs> #36 0x00005555556f8713 in maybe_call_debugger (data=0x555558688013, sig=0xe9d0, conditions=0x7ffff1be007b) at lisp.h:1032
> Gijs> #37 signal_or_quit (error_symbol=0xe9d0, data=0x555558688013, keyboard_quit=<optimized out>) at eval.c:1666
> Gijs> #38 0x000055555559a5f0 in Fsignal (error_symbol=<optimized out>, error_symbol@entry=0xe9d0, data=<optimized out>) at eval.c:1568
> Gijs> #39 0x000055555559a7ca in xsignal (data=<optimized out>, error_symbol=0xe9d0) at lisp.h:4140
> Gijs> #40 xsignal2 (error_symbol=error_symbol@entry=0xe9d0, arg1=arg1@entry=0xc8a0, arg2=arg2@entry=0x14a) at eval.c:1713
> Gijs> #41 0x00005555555997f9 in wrong_type_argument (predicate=predicate@entry=0xc8a0, value=value@entry=0x14a) at lisp.h:1032
> Gijs> #42 0x0000555555599e07 in CHECK_TYPE (x=0x14a, predicate=0xc8a0, ok=0) at data.c:1991
> Gijs> #43 CHECK_SYMBOL (x=0x14a) at lisp.h:1052
> Gijs> #44 set_internal (symbol=0x14a, newval=<optimized out>, where=<optimized out>, bindflag=<optimized out>) at data.c:1307
> Gijs> #45 0x00005555556e70c6 in Fset (symbol=<optimized out>, newval=0x9c4e) at lisp.h:1032
see frame #41? there's a Lisp error here, triggered by calling Fset
from Lisp. In frame #40, we could see the error symbol (most probably
wrong-type-argument) and error data, which is much more interesting.
> 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
This indeed cannot happen, since $1 and $2 mean the buffer is either
unibyte or pure-ASCII (the character count and the byte count are
identical), whereas $3 and $4 tell us there's some multibyte character
in the buffer before or at buffer position 495.
Is the buffer multibyte or not? (You can tell by looking at the value
of 'BVAR (buffer, enable_multibyte_characters)'.) Also, can you show
the entire text of the buffer, which begins at current_buffer->text->beg?
You need to exercise caution near the gap (unless it's at the end of
the buffer), because the gap is not part of buffer text.
Thanks.
next prev parent reply other threads:[~2020-01-22 16:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-20 16:28 bug#39207: 28.0.50; crash when sending gnus message Gijs Hillenius
2020-01-20 16:50 ` Robert Pluim
2020-01-21 9:06 ` Gijs Hillenius
2020-01-21 9:32 ` Robert Pluim
2020-01-21 9:43 ` Gijs Hillenius
2020-01-21 10:39 ` Robert Pluim
2020-01-21 10:44 ` Andreas Schwab
2020-01-21 10:46 ` Gijs Hillenius
2020-01-21 11:08 ` bug#39207: WITH dgb symbols " Gijs Hillenius
2020-01-21 13:36 ` Robert Pluim
2020-01-21 15:39 ` Eli Zaretskii
2020-01-21 16:11 ` Gijs Hillenius
2020-01-21 17:06 ` Robert Pluim
2020-01-22 7:17 ` Gijs Hillenius
2020-01-22 7:47 ` Robert Pluim
[not found] ` <87lfpzsvq5.fsf@hillenius.net>
2020-01-22 12:12 ` Robert Pluim
2020-01-22 16:13 ` Eli Zaretskii [this message]
2020-01-22 16:58 ` Robert Pluim
2020-01-22 17:37 ` Eli Zaretskii
2020-01-22 20:39 ` Robert Pluim
2020-01-22 20:57 ` Andreas Schwab
2020-01-22 21:15 ` bug#39207: WITH dgb symbols Re: bug✓39207: " Robert Pluim
2020-01-22 21:43 ` Andreas Schwab
2020-01-22 21:13 ` bug#39207: WITH dgb symbols Re: bug#39207: " Andreas Schwab
2020-01-23 7:52 ` Paul Eggert
2020-01-23 8:48 ` Robert Pluim
2020-01-23 9:02 ` Paul Eggert
2020-01-23 5:54 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a76fv58n.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=39207@debbugs.gnu.org \
--cc=gijs@hillenius.net \
--cc=rpluim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).