Subject: bug#28710: 27.0.50; eassert failure in maybe_produce_line_number

From: Alex <[email-masked]>
Date: Wed, 04 Oct 2017 16:31:33 -0600

I can so far only produce this with magit[1], but I've attached the output
of "bt full" below.

1. Open up a diff in magit (e.g., M-x magit-status then RET on the first
line).
2. Press RET on an added line.
3. In the opened buffer, do M-: (setq display-line-numbers t)
4. C-x b RET
5. Press RET on the line again.

If I use (e)debug to try and trace the function call, then for whatever
reason it doesn't crash at step 5, but a call to `list-buffers' will
then crash. It also doesn't crash if I use (call-interactively
#'magit-diff-visit-file) rather than hitting RET, even though RET is
bound to `magit-diff-visit-file'.

Footnotes:

[1] https://github.com/magit/magit

In GNU Emacs 27.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
 of 2017-10-04 built on lylat
Repository revision: 92045f4546b9708dc9f69954799d211c1f56ff1e
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description:	Debian GNU/Linux testing (buster)

Configured using:
 'configure --enable-checking=yes,glyphs --enable-check-lisp-object-type
 'CFLAGS=-O0 -g3''