all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: sand@blarg.net, 32265@debbugs.gnu.org
Subject: bug#32265: 26.1; yank-excluded-properties set to t triggers "Error in syntax_table logic for intervals <-" signal
Date: Tue, 31 Jul 2018 21:06:08 -0400	[thread overview]
Message-ID: <87a7q628vz.fsf@gmail.com> (raw)
In-Reply-To: <83va8vnzz2.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 31 Jul 2018 19:15:29 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> I presume just calling set-text-properties with the same arguments
> there doesn't trigger the problem?  If so, I think we need to
> understand how come we got offset=-1 in frame #4.

Actually, it looks like it can be triggered with just
set-text-properties, but there is some interaction with
c-before-change.  I've reduced the testcase to this:

    (defconst dir (file-name-directory
                   (or load-file-name buffer-file-name)))

    (pop-to-buffer-same-window (get-buffer-create "*test*"))
    (erase-buffer)
    (insert-file-contents (expand-file-name "U.java" dir))
    (java-mode)
    (set-text-properties 10467 10542 nil)

The the after and before change functions can be reduced and still
trigger the assertion except for c-before-change which is needed to
reproduce:

    (let ((before-change-functions
           '(c-before-change ;t syntax-ppss-flush-cache
             ))
          (after-change-functions nil))
      (set-text-properties 10467 10542 nil))

The backtrace no longer has a negative offset to blame:

../../src/intervals.c:371: Emacs fatal error: assertion failed: LENGTH (i) > 0

(gdb) bt 8
#0  terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at ../../src/emacs.c:364
#1  0x00000000006161d3 in die (msg=0x7795cd "LENGTH (i) > 0", file=0x7794f0 "../../src/intervals.c", 
    line=371) at ../../src/alloc.c:7410
#2  0x00000000006b51c4 in balance_an_interval (i=0x324b0b0) at ../../src/intervals.c:371
#3  0x00000000006b5792 in split_interval_right (interval=0x181f380 <bss_sbrk_buffer+10524736>, 
    offset=4048) at ../../src/intervals.c:504
#4  0x00000000006bfe11 in set_text_properties_1 (start=make_number(10467), end=make_number(10542), 
    properties=XIL(0), object=XIL(0x2f64925), i=0x181f380 <bss_sbrk_buffer+10524736>)
    at ../../src/textprop.c:1436
#5  0x00000000006bfcad in set_text_properties (start=make_number(10467), end=make_number(10542), 
    properties=XIL(0), object=XIL(0x2f64925), coherent_change_p=XIL(0xc090))
    at ../../src/textprop.c:1397
#6  0x00000000006bf9d6 in Fset_text_properties (start=make_number(10467), end=make_number(10542), 
    properties=XIL(0), object=XIL(0)) at ../../src/textprop.c:1304
#7  0x000000000063c85d in eval_sub (form=XIL(0x1546ae3)) at ../../src/eval.c:2248
(More stack frames follow...)

Lisp Backtrace:
"set-text-properties" (0xffffbc70)
"eval-buffer" (0xffffbfb0)
"load-with-code-conversion" (0xffffc538)
"load" (0xffffc918)
"command-line-1" (0xffffd270)
"command-line" (0xffffde88)
"normal-top-level" (0xffffe4b0)






  reply	other threads:[~2018-08-01  1:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  5:15 bug#32265: 26.1; yank-excluded-properties set to t triggers "Error in syntax_table logic for intervals <-" signal Derek Upham
2018-07-31 12:04 ` Noam Postavsky
2018-07-31 16:15   ` Eli Zaretskii
2018-08-01  1:06     ` Noam Postavsky [this message]
2018-08-01 10:15       ` Eli Zaretskii
2018-08-01 13:54         ` Derek Upham
2018-08-01 15:38           ` Eli Zaretskii
2018-08-02  4:44             ` Derek Upham
2018-08-02 13:31               ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7q628vz.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=32265@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=sand@blarg.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.