From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 15 12:08:20 2017 Received: (at submit) by debbugs.gnu.org; 15 Oct 2017 16:08:20 +0000 Received: from localhost ([127.0.0.1]:41822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3lSe-0002Iq-6P for submit@debbugs.gnu.org; Sun, 15 Oct 2017 12:08:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3lSc-0002Id-1o for submit@debbugs.gnu.org; Sun, 15 Oct 2017 12:08:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3lSU-0007sC-N9 for submit@debbugs.gnu.org; Sun, 15 Oct 2017 12:08:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38924) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e3lSU-0007s3-JL for submit@debbugs.gnu.org; Sun, 15 Oct 2017 12:08:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3lSS-0000ks-04 for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 12:08:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3lSN-0007ld-TX for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 12:08:07 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3lSE-0007Vb-1t; Sun, 15 Oct 2017 12:07:54 -0400 Received: from [176.228.60.248] (port=1078 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e3lSD-0004ZH-5X; Sun, 15 Oct 2017 12:07:53 -0400 Date: Sun, 15 Oct 2017 19:07:50 +0300 Message-Id: <83lgkcgzs9.fsf@gnu.org> From: Eli Zaretskii To: bug-gnu-emacs@gnu.org, Alan Mackenzie Subject: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This bug is bugging me for quite some time now, and my hopes for it to be resolved are now gone, so I finally sat down to debug it. I have jit-lock-stealth turned on in my sessions, so whenever I restart Emacs (e.g., when I build a new binary, or after a system restart), and restore my session using desktop.el, Emacs starts fontifying in the background. At some point, sometimes more than once, I get this error: Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Today I ran Emacs under a debugger, and caught this error. The details are below, but in a nutshell, CC mode's fontification functions call re-search-forward with BOUND that is before point. I hope the data below is enough to understand why that happens and fix it; if not, please tell what additional data is needed to diagnose the problem. Here're the C and Lisp backtraces from the error, and some relevant data that explains why the error happened: Thread 1 hit Breakpoint 5, search_command (string=..., bound=make_number(123806), noerror=..., count=..., direction=direction@entry=1, RE=RE@entry=1, posix=posix@entry=false) at search.c:1046 1046 error ("Invalid search bound (wrong side of point)"); (gdb) bt #0 search_command (string=..., bound=make_number(123806), noerror=..., count=..., direction=direction@entry=1, RE=RE@entry=1, posix=posix@entry=false) at search.c:1046 #1 0x011cd2c9 in Fre_search_forward (regexp=XIL(0x800000000ad97598), bound=..., noerror=..., count=...) at search.c:2271 #2 0x0121f9f0 in funcall_subr (subr=, subr@entry=0x137fc48 , numargs=, numargs@entry=3, args=, args@entry=0x8898d0) at eval.c:2849 #3 0x0121ddc6 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x8898c8) at eval.c:2766 #4 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000ad526b8), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #5 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=4, arg_vector=arg_vector@entry=0x889ed0) at eval.c:3049 #6 0x0121de35 in Ffuncall (nargs=nargs@entry=5, args=args@entry=0x889ec8) at eval.c:2768 #7 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000ad97558), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #8 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88a410) at eval.c:3049 #9 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88a408) at eval.c:2768 #10 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000add7b70), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #11 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=5, arg_vector=arg_vector@entry=0x88a980) at eval.c:3049 #12 0x0121de35 in Ffuncall (nargs=nargs@entry=6, args=args@entry=0x88a978) at eval.c:2768 #13 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000add8368), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #14 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=5, arg_vector=arg_vector@entry=0x88ae50) at eval.c:3049 #15 0x0121de35 in Ffuncall (nargs=nargs@entry=6, args=args@entry=0x88ae48) at eval.c:2768 #16 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000add83e8), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #17 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88b310) at eval.c:3049 #18 0x0121de35 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x88b308) at eval.c:2768 #19 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000ad54fe0), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #20 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=4, arg_vector=arg_vector@entry=0x88c040) at eval.c:3049 #21 0x0121de35 in Ffuncall (nargs=nargs@entry=5, args=args@entry=0x88c038) at eval.c:2768 #22 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000add83c8), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #23 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88c410) at eval.c:3049 #24 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88c408) at eval.c:2768 #25 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146ae20), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #26 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88ca70) at eval.c:3049 #27 0x0121de35 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x88ca68) at eval.c:2768 #28 0x0129445c in exec_byte_code (bytestr=XIL(0x8000000001469d78), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #29 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88ce60) at eval.c:3049 #30 0x0121de35 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x88ce58) at eval.c:2768 #31 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000adad4c0), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #32 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88d230) at eval.c:3049 #33 0x0121de35 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x88d228) at eval.c:2768 #34 0x0129445c in exec_byte_code (bytestr=XIL(0x8000000001469798), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #35 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88d578) at eval.c:3049 #36 0x0121de35 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88d570) at eval.c:2768 #37 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146d9a8), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=1, args=, args@entry=0x88daf8) at bytecode.c:629 #38 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88daf8) at eval.c:2967 #39 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88daf0) at eval.c:2768 #40 0x0121dfff in run_hook_wrapped_funcall (nargs=2, args=0x88daf0) at eval.c:2493 #41 0x0121b1e2 in run_hook_with_args (nargs=nargs@entry=2, args=args@entry=0x88daf0, funcall=funcall@entry=0x121dfcf ) at eval.c:2574 #42 0x0121b38b in Frun_hook_wrapped (nargs=2, args=0x88daf0) at eval.c:2508 #43 0x0121f8f8 in funcall_subr ( subr=subr@entry=0x167d5c8 , numargs=numargs@entry=2, args=args@entry=0x88daf0) at eval.c:2821 #44 0x0121ddc6 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88dae8) at eval.c:2766 #45 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146d938), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=2, args=, args@entry=0x88dee0) at bytecode.c:629 #46 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88dee0) at eval.c:2967 #47 0x0121de35 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88ded8) at eval.c:2768 #48 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146da00), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=2, args=, args@entry=0x88e3e0) at bytecode.c:629 #49 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88e3e0) at eval.c:2967 #50 0x0121de35 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88e3d8) at eval.c:2768 #51 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146dc90), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=1, args=, args@entry=0x88e9d0) at bytecode.c:629 #52 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88e9d0) at eval.c:2967 #53 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88e9c8) at eval.c:2768 #54 0x01220d8a in Fapply (nargs=2, args=0x88e9c8) at eval.c:2343 #55 0x0121f8f8 in funcall_subr (subr=subr@entry=0x167d668 , numargs=numargs@entry=2, args=args@entry=0x88e9c8) at eval.c:2821 #56 0x0121ddc6 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88e9c0) at eval.c:2766 #57 0x0129445c in exec_byte_code (bytestr=XIL(0x80000000014770f8), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=1, args=, args@entry=0x88edb8) at bytecode.c:629 #58 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88edb8) at eval.c:2967 #59 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88edb0) at eval.c:2768 #60 0x0121e088 in call1 (fn=XIL(0xf1f0), arg1=...) at eval.c:2617 #61 0x0114a180 in timer_check_2 (timers=..., idle_timers=...) at keyboard.c:4462 #62 0x01150644 in timer_check () at keyboard.c:4524 #63 0x0115069a in readable_events (flags=flags@entry=1) at keyboard.c:3340 #64 0x011594d2 in get_input_pending (flags=flags@entry=1) at keyboard.c:6824 #65 0x011596b9 in detect_input_pending_run_timers ( do_display=do_display@entry=true) at keyboard.c:9951 #66 0x012a9223 in wait_reading_process_output (time_limit=, nsecs=, nsecs@entry=0, read_kbd=, read_kbd@entry=-1, do_display=, wait_for_cell=..., wait_proc=, wait_proc@entry=0x0, just_wait_proc=, just_wait_proc@entry=0) at process.c:5504 #67 0x01159b56 in kbd_buffer_get_event (kbp=kbp@entry=0x88f47c, used_mouse_menu=used_mouse_menu@entry=0x88f7c3, end_time=end_time@entry=0x0) at keyboard.c:3831 #68 0x0115aab4 in read_event_from_main_queue (end_time=end_time@entry=0x0, local_getcjmp=local_getcjmp@entry=0x88f670, used_mouse_menu=used_mouse_menu@entry=0x88f7c3) at keyboard.c:2151 #69 0x0115ae38 in read_decoded_event_from_main_queue ( end_time=end_time@entry=0x0, local_getcjmp=local_getcjmp@entry=0x88f670, prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x88f7c3) at keyboard.c:2214 #70 0x0115c9ff in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=used_mouse_menu@entry=0x88f7c3, end_time=end_time@entry=0x0) at keyboard.c:2802 #71 0x0115e6be in read_key_sequence (keybuf=keybuf@entry=0x88f870, bufsize=bufsize@entry=30, prompt=XIL(0xfb938800000000), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false) at keyboard.c:9147 #72 0x01161825 in command_loop_1 () at keyboard.c:1368 #73 0x0121a98e in internal_condition_case ( bfun=bfun@entry=0x1161517 , handlers=..., hfun=hfun@entry=0x114d246 ) at eval.c:1332 #74 0x01142ce3 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1110 #75 0x0121a8f0 in internal_catch (tag=XIL(0xf538), func=func@entry=0x1142cbc , arg=...) at eval.c:1097 #76 0x01142c8b in command_loop () at keyboard.c:1089 #77 0x0114cba6 in recursive_edit_1 () at keyboard.c:695 #78 0x0114cff7 in Frecursive_edit () at keyboard.c:766 #79 0x01141ab3 in main (argc=, argv=) at emacs.c:1713 Lisp Backtrace: "re-search-forward" (0x8898d0) "c-syntactic-re-search-forward" (0x889ed0) "c-forward-declarator" (0x88a410) "c-font-lock-declarators" (0x88a980) "c-font-lock-single-decl" (0x88ae50) 0xad881a0 PVEC_COMPILED "c-find-decl-spots" (0x88c040) "c-font-lock-declarations" (0x88c410) "font-lock-fontify-keywords-region" (0x88ca70) "font-lock-default-fontify-region" (0x88ce60) "c-font-lock-fontify-region" (0x88d230) "font-lock-fontify-region" (0x88d578) 0x83d89a8 PVEC_COMPILED "run-hook-wrapped" (0x88daf0) "jit-lock--run-functions" (0x88dee0) "jit-lock-fontify-now" (0x88e3e0) "jit-lock-stealth-fontify" (0x88e9d0) "apply" (0x88e9c8) "timer-event-handler" (0x88edb8) (gdb) p n $1 = 1 (gdb) p lim $2 = (gdb) pp bound 123806 (gdb) p PT $3 = 123811 So point is 123811 and the BOUND argument of re-search-forward is 123806, too small. (gdb) up #1 0x011cd2c9 in Fre_search_forward (regexp=XIL(0x800000000ad97598), bound=..., noerror=..., count=...) at search.c:2271 2271 return search_command (regexp, bound, noerror, count, 1, 1, 0); (gdb) pp regexp "[;:,]\\|\\s)\\|\\(=\\|\\s(\\)" (gdb) p current_buffer $4 = (struct buffer *) 0xb362590 (gdb) pp current_buffer->name_ "process.c" These are the regexp argument to re-search-forward and the buffer which was being fontified. The problem happens in c-syntactic-re-search-forward in this snippet: (condition-case err (while (and (progn (setq search-pos (point)) (if (re-search-forward regexp bound noerror) <<<<<<<<<<< t ;; Without the following, when PAREN-LEVEL is non-nil, and ;; NOERROR is not nil or t, and the very first search above ;; has just failed, point would end up at BOUND rather than ;; just before the next close paren. (when (and (eq search-pos start) paren-level (not (memq noerror '(nil t)))) (setq state (parse-partial-sexp start bound -1)) (if (eq (car state) -1) (setq bound (1- (point))))) nil)) This is called from c-forward-declarator: ;; Search syntactically to the end of the declarator (";", ;; ",", a closing paren, eob etc) or to the beginning of an ;; initializer or function prototype ("=" or "\\s\("). ;; Note that square brackets are now not also treated as ;; initializers, since this broke when there were also ;; initializing brace lists. (let (found) (while (and (progn ;; In the next loop, we keep searching forward whilst ;; we find ":"s which aren't single colons inside C++ ;; "for" statements. (while (and (setq found (c-syntactic-re-search-forward <<<<<<<<<<< "[;:,]\\|\\s)\\|\\(=\\|\\s(\\)" limit t t)) It looks like c-syntactic-re-search-forward calls re-search-forward in a loop, but perhaps it fails to update the limit to be in sync with point that moves as the search proceeds? Let me know what other data I can provide to help fix this annoying problem. In GNU Emacs 26.0.90 (build 1, i686-pc-mingw32) of 2017-10-12 built on HOME-C4E4A596F7 Windowing system distributor 'Microsoft Corp.', version 5.1.2600 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=/d/usr --with-wide-int --with-modules --enable-checking=yes,glyphs 'CFLAGS=-Og -gdwarf-4 -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES LCMS2 Important settings: value of $LANG: ENU locale-coding-system: cp1255 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 100974 11112) (symbols 56 21280 1) (miscs 48 40 107) (strings 16 31517 1999) (string-bytes 1 759703) (vectors 16 14009) (vector-slots 8 645650 16134) (floats 8 51 226) (intervals 40 268 103) (buffers 880 11)) From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 17 12:46:07 2017 Received: (at submit) by debbugs.gnu.org; 17 Oct 2017 16:46:07 +0000 Received: from localhost ([127.0.0.1]:46534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4V0J-0008JG-5f for submit@debbugs.gnu.org; Tue, 17 Oct 2017 12:46:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4V0I-0008DI-8W for submit@debbugs.gnu.org; Tue, 17 Oct 2017 12:46:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4V0C-0003JZ-FD for submit@debbugs.gnu.org; Tue, 17 Oct 2017 12:46:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40987) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4V0C-0003JU-Br for submit@debbugs.gnu.org; Tue, 17 Oct 2017 12:46:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4V0B-0001kH-2D for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 12:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4V06-0003G8-NA for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 12:45:59 -0400 Received: from ocolin.muc.de ([193.149.48.4]:17995 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1e4V06-0003ET-Hi for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 12:45:54 -0400 Received: (qmail 41564 invoked by uid 3782); 17 Oct 2017 16:45:50 -0000 Received: from acm.muc.de (p548C70A0.dip0.t-ipconnect.de [84.140.112.160]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 17 Oct 2017 18:45:50 +0200 Received: (qmail 4754 invoked by uid 1000); 17 Oct 2017 16:42:34 -0000 Date: Tue, 17 Oct 2017 16:42:34 +0000 To: Eli Zaretskii Subject: Re: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20171017164234.GA4725@ACM> References: <83lgkcgzs9.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83lgkcgzs9.fsf@gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) Hello, Eli. On Sun, Oct 15, 2017 at 19:07:50 +0300, Eli Zaretskii wrote: > This bug is bugging me for quite some time now, and my hopes for it to > be resolved are now gone, so I finally sat down to debug it. > I have jit-lock-stealth turned on in my sessions, so whenever I > restart Emacs (e.g., when I build a new binary, or after a system > restart), and restore my session using desktop.el, Emacs starts > fontifying in the background. At some point, sometimes more than > once, I get this error: > Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") > Today I ran Emacs under a debugger, and caught this error. The > details are below, but in a nutshell, CC mode's fontification > functions call re-search-forward with BOUND that is before point. I > hope the data below is enough to understand why that happens and fix > it; if not, please tell what additional data is needed to diagnose the > problem. > Here're the C and Lisp backtraces from the error, and some relevant > data that explains why the error happened: Thanks for the bug report, and what you've worked out, so far. I'm afraid it's going to be several days before I get a chance to look at it properly, with things in Real Life interfering significantly at the moment. I will look at it, though. [ .... ] -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 22 16:18:21 2017 Received: (at 28850) by debbugs.gnu.org; 22 Oct 2017 20:18:22 +0000 Received: from localhost ([127.0.0.1]:56263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6MhR-00043o-HU for submit@debbugs.gnu.org; Sun, 22 Oct 2017 16:18:21 -0400 Received: from ocolin.muc.de ([193.149.48.4]:38500 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1e6MhP-00043f-E5 for 28850@debbugs.gnu.org; Sun, 22 Oct 2017 16:18:20 -0400 Received: (qmail 69346 invoked by uid 3782); 22 Oct 2017 20:18:15 -0000 Received: from acm.muc.de (p548C6A88.dip0.t-ipconnect.de [84.140.106.136]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 22 Oct 2017 22:18:14 +0200 Received: (qmail 21806 invoked by uid 1000); 22 Oct 2017 20:13:40 -0000 Date: Sun, 22 Oct 2017 20:13:40 +0000 To: Eli Zaretskii Subject: Re: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20171022201340.GA16074@ACM> References: <83lgkcgzs9.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83lgkcgzs9.fsf@gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello again, Eli. On Sun, Oct 15, 2017 at 19:07:50 +0300, Eli Zaretskii wrote: > This bug is bugging me for quite some time now, and my hopes for it to > be resolved are now gone, so I finally sat down to debug it. > I have jit-lock-stealth turned on in my sessions, so whenever I > restart Emacs (e.g., when I build a new binary, or after a system > restart), and restore my session using desktop.el, Emacs starts > fontifying in the background. At some point, sometimes more than > once, I get this error: > Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") > Today I ran Emacs under a debugger, and caught this error. The > details are below, but in a nutshell, CC mode's fontification > functions call re-search-forward with BOUND that is before point. I > hope the data below is enough to understand why that happens and fix > it; if not, please tell what additional data is needed to diagnose the > problem. The details you've given me are enough to form a strong hypothesis. Thanks. > Here're the C and Lisp backtraces from the error, and some relevant > data that explains why the error happened: [ .... ] > Lisp Backtrace: > "re-search-forward" (0x8898d0) > "c-syntactic-re-search-forward" (0x889ed0) > "c-forward-declarator" (0x88a410) > "c-font-lock-declarators" (0x88a980) > "c-font-lock-single-decl" (0x88ae50) > 0xad881a0 PVEC_COMPILED > "c-find-decl-spots" (0x88c040) > "c-font-lock-declarations" (0x88c410) > "font-lock-fontify-keywords-region" (0x88ca70) > "font-lock-default-fontify-region" (0x88ce60) > "c-font-lock-fontify-region" (0x88d230) > "font-lock-fontify-region" (0x88d578) > 0x83d89a8 PVEC_COMPILED > "run-hook-wrapped" (0x88daf0) > "jit-lock--run-functions" (0x88dee0) > "jit-lock-fontify-now" (0x88e3e0) > "jit-lock-stealth-fontify" (0x88e9d0) > "apply" (0x88e9c8) > "timer-event-handler" (0x88edb8) > (gdb) p n > $1 = 1 > (gdb) p lim > $2 = > (gdb) pp bound > 123806 > (gdb) p PT > $3 = 123811 > So point is 123811 and the BOUND argument of re-search-forward is > 123806, too small. What I think's happening is that c-forward-declarator has found a "[" which is before BOUND, but then sets point to the matching "]" which is after BOUND. It then calls c-syntactic-re-search-forward again, resulting in the error. In master's process.c, there is a "]" very close to 123811. > (gdb) up > #1 0x011cd2c9 in Fre_search_forward (regexp=XIL(0x800000000ad97598), > bound=..., noerror=..., count=...) at search.c:2271 > 2271 return search_command (regexp, bound, noerror, count, 1, 1, 0); > (gdb) pp regexp > "[;:,]\\|\\s)\\|\\(=\\|\\s(\\)" > (gdb) p current_buffer > $4 = (struct buffer *) 0xb362590 > (gdb) pp current_buffer->name_ > "process.c" > These are the regexp argument to re-search-forward and the buffer > which was being fontified. > The problem happens in c-syntactic-re-search-forward in this snippet: [ .... ] > This is called from c-forward-declarator: > ;; Search syntactically to the end of the declarator (";", > ;; ",", a closing paren, eob etc) or to the beginning of an > ;; initializer or function prototype ("=" or "\\s\("). > ;; Note that square brackets are now not also treated as > ;; initializers, since this broke when there were also > ;; initializing brace lists. > (let (found) > (while > (and (progn > ;; In the next loop, we keep searching forward whilst > ;; we find ":"s which aren't single colons inside C++ > ;; "for" statements. > (while > (and > (setq found > (c-syntactic-re-search-forward <<<<<<<<<<< > "[;:,]\\|\\s)\\|\\(=\\|\\s(\\)" > limit t t)) As already suggested, I think the bug is that there aren't enough checks that (< (point) limit) in this function. I have added them in. > It looks like c-syntactic-re-search-forward calls re-search-forward in > a loop, but perhaps it fails to update the limit to be in sync with > point that moves as the search proceeds? A further problem is that c-font-lock-declarators is calling c-forward-declarator with a limit; this is silly - if the end of a declaration runs over a jit-lock chunk boundary, we still want to fontify this declaration fully. So I've changed the LIMIT argument in the pertinent two calls to nil. (There is a third call somewhere where this LIMIT argument is the end of a macro, and it is absolutely needed). > Let me know what other data I can provide to help fix this annoying > problem. I haven't reproduced the problem, but I admit I haven't tried all that hard. Could you please try out the patch below, and let me know if it fixes the bug. > In GNU Emacs 26.0.90 (build 1, i686-pc-mingw32) > of 2017-10-12 built on HOME-C4E4A596F7 > Windowing system distributor 'Microsoft Corp.', version 5.1.2600 > Recent messages: > For information about GNU Emacs and the GNU system, type C-h C-a. [ .... ] diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 3792835752..07b9215046 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -8102,12 +8102,14 @@ c-forward-declarator ;; initializing brace lists. (let (found) (while - (and (progn + (and (< (point) limit) + (progn ;; In the next loop, we keep searching forward whilst ;; we find ":"s which aren't single colons inside C++ ;; "for" statements. (while (and + (< (point) limit) (setq found (c-syntactic-re-search-forward "[;:,]\\|\\s)\\|\\(=\\|\\s(\\)" @@ -8129,7 +8131,7 @@ c-forward-declarator (c-go-up-list-forward)) (setq brackets-after-id t)) (when found (backward-char)) - t)) + (<= (point) limit))) (list id-start id-end brackets-after-id (match-beginning 1) decorated) (goto-char here) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 02b685d240..b8dbe3c26b 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1062,7 +1062,7 @@ c-font-lock-declarators ;; The following `while' fontifies a single declarator id each time round. ;; It loops only when LIST is non-nil. (while - (and pos (setq decl-res (c-forward-declarator limit))) + (and pos (setq decl-res (c-forward-declarator))) (setq next-pos (point) id-start (car decl-res) id-face (if (and (eq (char-after) ?\() @@ -1091,7 +1091,7 @@ c-font-lock-declarators (throw 'is-function nil)) ((not (eq got-type 'maybe)) (throw 'is-function t))) - (c-forward-declarator limit t) + (c-forward-declarator nil t) (eq (char-after) ?,)) (forward-char) (c-forward-syntactic-ws)) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 10:46:34 2017 Received: (at 28850) by debbugs.gnu.org; 24 Oct 2017 14:46:34 +0000 Received: from localhost ([127.0.0.1]:60007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e70TR-0008E5-T7 for submit@debbugs.gnu.org; Tue, 24 Oct 2017 10:46:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e70TP-0008Dq-QQ for 28850@debbugs.gnu.org; Tue, 24 Oct 2017 10:46:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e70TH-0006HT-Av for 28850@debbugs.gnu.org; Tue, 24 Oct 2017 10:46:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e70TH-0006HP-82; Tue, 24 Oct 2017 10:46:23 -0400 Received: from [176.228.60.248] (port=4044 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e70TG-0003mv-Kk; Tue, 24 Oct 2017 10:46:23 -0400 Date: Tue, 24 Oct 2017 17:46:08 +0300 Message-Id: <834lqoa9jj.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20171022201340.GA16074@ACM> (message from Alan Mackenzie on Sun, 22 Oct 2017 20:13:40 +0000) Subject: Re: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28850 Cc: 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sun, 22 Oct 2017 20:13:40 +0000 > Cc: 28850@debbugs.gnu.org > From: Alan Mackenzie > > > So point is 123811 and the BOUND argument of re-search-forward is > > 123806, too small. > > What I think's happening is that c-forward-declarator has found a "[" > which is before BOUND, but then sets point to the matching "]" which is > after BOUND. It then calls c-syntactic-re-search-forward again, > resulting in the error. > > In master's process.c, there is a "]" very close to 123811. For the record, here's the place where this happened, with the two locations shown by "^": char namebuf[sizeof (ifq->ifr_name) + 1]; ^ ^ The reason you don't see this in process.c you have is that the version I used was edited wrt to what you have. > I haven't reproduced the problem, but I admit I haven't tried all that > hard. Could you please try out the patch below, and let me know if it > fixes the bug. Thanks, this fixes a very large part of the problem, so I think you should install this on the release branch. It doesn't solve all of it, though, because I got that breakpoint hit again. This time it took much longer before that happened (a sign that most of the problem is indeed solved), and the backtrace is different. Here's the C and the Lisp backtraces, followed by some relevant values: Thread 1 hit Breakpoint 3, search_command (string=..., bound=make_number(2425), noerror=..., count=..., direction=direction@entry=1, RE=RE@entry=1, posix=posix@entry=false) at search.c:1046 1046 error ("Invalid search bound (wrong side of point)"); (gdb) bt #0 search_command (string=..., bound=make_number(2425), noerror=..., count=..., direction=direction@entry=1, RE=RE@entry=1, posix=posix@entry=false) at search.c:1046 #1 0x011cd2c9 in Fre_search_forward (regexp=XIL(0x800000000adcb1f0), bound=..., noerror=..., count=...) at search.c:2271 #2 0x0121f9f0 in funcall_subr (subr=, subr@entry=0x137fc48 , numargs=, numargs@entry=3, args=, args@entry=0x88c050) at eval.c:2849 #3 0x0121ddc6 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x88c048) at eval.c:2766 #4 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000adcb1c0), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #5 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88c410) at eval.c:3049 #6 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88c408) at eval.c:2768 #7 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146ae20), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #8 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88ca70) at eval.c:3049 #9 0x0121de35 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x88ca68) at eval.c:2768 #10 0x0129445c in exec_byte_code (bytestr=XIL(0x8000000001469d78), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #11 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88ce60) at eval.c:3049 #12 0x0121de35 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x88ce58) at eval.c:2768 #13 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000ad9d5a8), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #14 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88d230) at eval.c:3049 #15 0x0121de35 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x88d228) at eval.c:2768 #16 0x0129445c in exec_byte_code (bytestr=XIL(0x8000000001469798), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:629 #17 0x0121d94f in funcall_lambda (fun=..., nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88d578) at eval.c:3049 #18 0x0121de35 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88d570) at eval.c:2768 #19 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146d9a8), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=1, args=, args@entry=0x88daf8) at bytecode.c:629 #20 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88daf8) at eval.c:2967 #21 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88daf0) at eval.c:2768 #22 0x0121dfff in run_hook_wrapped_funcall (nargs=2, args=0x88daf0) at eval.c:2493 #23 0x0121b1e2 in run_hook_with_args (nargs=nargs@entry=2, args=args@entry=0x88daf0, funcall=funcall@entry=0x121dfcf ) at eval.c:2574 #24 0x0121b38b in Frun_hook_wrapped (nargs=2, args=0x88daf0) at eval.c:2508 #25 0x0121f8f8 in funcall_subr ( subr=subr@entry=0x167d5c8 , numargs=numargs@entry=2, args=args@entry=0x88daf0) at eval.c:2821 #26 0x0121ddc6 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88dae8) at eval.c:2766 #27 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146d938), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=2, args=, args@entry=0x88dee0) at bytecode.c:629 #28 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88dee0) at eval.c:2967 #29 0x0121de35 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88ded8) at eval.c:2768 #30 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146da00), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=2, args=, args@entry=0x88e3e0) at bytecode.c:629 #31 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88e3e0) at eval.c:2967 #32 0x0121de35 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88e3d8) at eval.c:2768 #33 0x0129445c in exec_byte_code (bytestr=XIL(0x800000000146dc90), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=1, args=, args@entry=0x88e9d0) at bytecode.c:629 #34 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88e9d0) at eval.c:2967 #35 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88e9c8) at eval.c:2768 #36 0x01220d8a in Fapply (nargs=2, args=0x88e9c8) at eval.c:2343 #37 0x0121f8f8 in funcall_subr (subr=subr@entry=0x167d668 , numargs=numargs@entry=2, args=args@entry=0x88e9c8) at eval.c:2821 #38 0x0121ddc6 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x88e9c0) at eval.c:2766 #39 0x0129445c in exec_byte_code (bytestr=XIL(0x80000000014770f8), vector=..., maxdepth=..., args_template=..., nargs=, nargs@entry=1, args=, args@entry=0x88edb8) at bytecode.c:629 #40 0x0121d467 in funcall_lambda (fun=..., nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88edb8) at eval.c:2967 #41 0x0121de35 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88edb0) at eval.c:2768 #42 0x0121e088 in call1 (fn=XIL(0xf1f0), arg1=...) at eval.c:2617 #43 0x0114a180 in timer_check_2 (timers=..., idle_timers=...) at keyboard.c:4462 #44 0x01150644 in timer_check () at keyboard.c:4524 #45 0x0115069a in readable_events (flags=flags@entry=1) at keyboard.c:3340 #46 0x011594d2 in get_input_pending (flags=flags@entry=1) at keyboard.c:6824 #47 0x011596b9 in detect_input_pending_run_timers ( do_display=do_display@entry=true) at keyboard.c:9951 #48 0x012a9223 in wait_reading_process_output (time_limit=, nsecs=, nsecs@entry=0, read_kbd=, read_kbd@entry=-1, do_display=, wait_for_cell=..., wait_proc=, wait_proc@entry=0x0, just_wait_proc=, just_wait_proc@entry=0) at process.c:5504 #49 0x01159b56 in kbd_buffer_get_event (kbp=kbp@entry=0x88f47c, used_mouse_menu=used_mouse_menu@entry=0x88f7c3, end_time=end_time@entry=0x0) at keyboard.c:3831 #50 0x0115aab4 in read_event_from_main_queue (end_time=end_time@entry=0x0, local_getcjmp=local_getcjmp@entry=0x88f670, used_mouse_menu=used_mouse_menu@entry=0x88f7c3) at keyboard.c:2151 #51 0x0115ae38 in read_decoded_event_from_main_queue ( end_time=end_time@entry=0x0, local_getcjmp=local_getcjmp@entry=0x88f670, prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x88f7c3) at keyboard.c:2214 #52 0x0115c9ff in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=used_mouse_menu@entry=0x88f7c3, end_time=end_time@entry=0x0) at keyboard.c:2802 #53 0x0115e6be in read_key_sequence (keybuf=keybuf@entry=0x88f870, bufsize=bufsize@entry=30, prompt=XIL(0x9b938800000000), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false) at keyboard.c:9147 #54 0x01161825 in command_loop_1 () at keyboard.c:1368 #55 0x0121a98e in internal_condition_case ( bfun=bfun@entry=0x1161517 , handlers=..., hfun=hfun@entry=0x114d246 ) at eval.c:1332 #56 0x01142ce3 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1110 #57 0x0121a8f0 in internal_catch (tag=XIL(0xf538), func=func@entry=0x1142cbc , arg=...) at eval.c:1097 #58 0x01142c8b in command_loop () at keyboard.c:1089 #59 0x0114cba6 in recursive_edit_1 () at keyboard.c:695 #60 0x0114cff7 in Frecursive_edit () at keyboard.c:766 #61 0x01141ab3 in main (argc=, argv=) at emacs.c:1713 Lisp Backtrace: "re-search-forward" (0x88c050) 0xad7f328 PVEC_COMPILED "font-lock-fontify-keywords-region" (0x88ca70) "font-lock-default-fontify-region" (0x88ce60) "c-font-lock-fontify-region" (0x88d230) "font-lock-fontify-region" (0x88d578) 0x13810840 PVEC_COMPILED "run-hook-wrapped" (0x88daf0) "jit-lock--run-functions" (0x88dee0) "jit-lock-fontify-now" (0x88e3e0) "jit-lock-stealth-fontify" (0x88e9d0) "apply" (0x88e9c8) "timer-event-handler" (0x88edb8) (gdb) pp current_buffer->name_ "platform.h" (gdb) pp current_buffer->directory_ "d:/utils/lz4-1.7.5/programs/" (gdb) p PT $1 = 2645 (gdb) p bound $2 = make_number(2425) (gdb) up #1 0x011cd2c9 in Fre_search_forward (regexp=XIL(0x800000000adcb1f0), bound=..., noerror=..., count=...) at search.c:2271 2271 return search_command (regexp, bound, noerror, count, 1, 1, 0); (gdb) pp regexp "\\(\\=\\|\\(\\=\\|[^\\]\\)[ ]\\)\\s *#\\s *\\(\\(?:\\(?:el\\)?if\\)\\)\\([^[:alnum:]_$]\\|$\\)\\(\\\\\\(.\\| [ ]\\)\\|[^ ]\\)*" As you see, point is at 2645, whereas BOUND is at 2425. This happens in the file platform.h from the lz4-1.7.5 distribution. Here's the relevant part of platform.h with the two locations shown (I added an empty line for each "^" marker): /* ************************************** * Detect 64-bit OS * http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros ****************************************/ #if defined __ia64 || defined _M_IA64 /* Intel Itanium */ \ || defined __powerpc64__ || defined __ppc64__ || defined __PPC64__ /* POWER 64-bit */ \ || (defined __sparc && (defined __sparcv9 || defined __sparc_v9__ || defined __arch64__)) || defined __sparc64__ /* SPARC 64-bit */ \ || defined __x86_64__s || defined _M_X64 /* x86 64-bit */ \ || defined __arm64__ || defined __aarch64__ || defined __ARM64_ARCH_8__ /* ARM 64-bit */ \ || (defined __mips && (__mips == 64 || __mips == 4 || __mips == 3)) /* MIPS 64-bit */ \ ^ || defined _LP64 || defined __LP64__ /* NetBSD, OpenBSD */ || defined __64BIT__ /* AIX */ || defined _ADDR64 /* Cray */ \ || (defined __SIZEOF_POINTER__ && __SIZEOF_POINTER__ == 8) /* gcc */ ^ # if !defined(__64BIT__) # define __64BIT__ 1 # endif #endif As you see, BOUND is after the closing paren, after "3))", and point is at the beginning of "__SIZEOF_POINTER__" a couple of lines further. To tell the truth, the Lisp backtrace puzzles me a bit, because the only call to re-search-forward in font-lock-fontify-keywords-region is protected by a condition that should have prevented this problem from happening: (while (and (< (point) end) (if (stringp matcher) (re-search-forward matcher end t) (funcall matcher end)) So maybe I'm missing something, or maybe the problematic call to re-search-forward comes from some macro expansion I didn't identify. Let me know if I can provide any more details for your analysis. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 16:38:27 2017 Received: (at 28850) by debbugs.gnu.org; 24 Oct 2017 20:38:27 +0000 Received: from localhost ([127.0.0.1]:60284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e75xz-0002xd-D8 for submit@debbugs.gnu.org; Tue, 24 Oct 2017 16:38:27 -0400 Received: from ocolin.muc.de ([193.149.48.4]:28282 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1e75xx-0002xV-A5 for 28850@debbugs.gnu.org; Tue, 24 Oct 2017 16:38:26 -0400 Received: (qmail 12980 invoked by uid 3782); 24 Oct 2017 20:38:20 -0000 Received: from acm.muc.de (p548C7320.dip0.t-ipconnect.de [84.140.115.32]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 24 Oct 2017 22:38:19 +0200 Received: (qmail 5945 invoked by uid 1000); 24 Oct 2017 20:33:12 -0000 Date: Tue, 24 Oct 2017 20:33:12 +0000 To: Eli Zaretskii Subject: Re: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20171024203312.GA5875@ACM> References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <834lqoa9jj.fsf@gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Eli. On Tue, Oct 24, 2017 at 17:46:08 +0300, Eli Zaretskii wrote: > > Date: Sun, 22 Oct 2017 20:13:40 +0000 > > Cc: 28850@debbugs.gnu.org > > From: Alan Mackenzie > > > So point is 123811 and the BOUND argument of re-search-forward is > > > 123806, too small. > > What I think's happening is that c-forward-declarator has found a "[" > > which is before BOUND, but then sets point to the matching "]" which is > > after BOUND. It then calls c-syntactic-re-search-forward again, > > resulting in the error. > > In master's process.c, there is a "]" very close to 123811. > For the record, here's the place where this happened, with the two > locations shown by "^": > char namebuf[sizeof (ifq->ifr_name) + 1]; > ^ ^ > The reason you don't see this in process.c you have is that the > version I used was edited wrt to what you have. :-). It's exactly as I'd surmised. > > I haven't reproduced the problem, but I admit I haven't tried all that > > hard. Could you please try out the patch below, and let me know if it > > fixes the bug. > Thanks, this fixes a very large part of the problem, so I think you > should install this on the release branch. I'll do that just as soon as I'm in the mood for routine work. This evening was right for debugging the rest of it. > It doesn't solve all of it, though, because I got that breakpoint hit > again. This time it took much longer before that happened (a sign > that most of the problem is indeed solved), and the backtrace is > different. This is an entirely separate bug. > Here's the C and the Lisp backtraces, followed by some relevant > values: [ .... ]. > Lisp Backtrace: > "re-search-forward" (0x88c050) > 0xad7f328 PVEC_COMPILED > "font-lock-fontify-keywords-region" (0x88ca70) > "font-lock-default-fontify-region" (0x88ce60) > "c-font-lock-fontify-region" (0x88d230) > "font-lock-fontify-region" (0x88d578) > 0x13810840 PVEC_COMPILED > "run-hook-wrapped" (0x88daf0) > "jit-lock--run-functions" (0x88dee0) > "jit-lock-fontify-now" (0x88e3e0) > "jit-lock-stealth-fontify" (0x88e9d0) > "apply" (0x88e9c8) > "timer-event-handler" (0x88edb8) > (gdb) pp current_buffer->name_ > "platform.h" > (gdb) pp current_buffer->directory_ > "d:/utils/lz4-1.7.5/programs/" > (gdb) p PT > $1 = 2645 > (gdb) p bound > $2 = make_number(2425) > (gdb) up > #1 0x011cd2c9 in Fre_search_forward (regexp=XIL(0x800000000adcb1f0), > bound=..., noerror=..., count=...) at search.c:2271 > 2271 return search_command (regexp, bound, noerror, count, 1, 1, 0); > (gdb) pp regexp > "\\(\\=\\|\\(\\=\\|[^\\]\\)[ > ]\\)\\s *#\\s *\\(\\(?:\\(?:el\\)?if\\)\\)\\([^[:alnum:]_$]\\|$\\)\\(\\\\\\(.\\| > [ > ]\\)\\|[^ > ]\\)*" I've tracked down that regexp. It matches "#if" or "#elif" inside macros. It's used in c-cpp-matchers in cc-fonts.el. > As you see, point is at 2645, whereas BOUND is at 2425. This happens > in the file platform.h from the lz4-1.7.5 distribution. Here's the > relevant part of platform.h with the two locations shown (I added an > empty line for each "^" marker): The reason for this is that a generated lambda form with the argument LIMIT (which would be the end of a jit-lock chunk or similar) internally binds LIMIT to the end of the current macro. Inside this binding, which searches for "defined" repeatedly, we go forward to after the last "defined", as indicated in your source excerpt below. Unfortunately, this point is beyond the original LIMIT supplied to the lambda, so in the next re-search-forward, point is the wrong side of this original LIMIT. This particular bit of CC Mode is "write only" code, and it could take me some while to disentangle the stack of macros and function generators which has produced it. I think I'm going to extract this form and rewrite it more by hand, making it simpler to debug in the future. > /* ************************************** > * Detect 64-bit OS > * http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros > ****************************************/ > #if defined __ia64 || defined _M_IA64 /* Intel Itanium */ \ > || defined __powerpc64__ || defined __ppc64__ || defined __PPC64__ /* POWER 64-bit */ \ > || (defined __sparc && (defined __sparcv9 || defined __sparc_v9__ || defined __arch64__)) || defined __sparc64__ /* SPARC 64-bit */ \ > || defined __x86_64__s || defined _M_X64 /* x86 64-bit */ \ > || defined __arm64__ || defined __aarch64__ || defined __ARM64_ARCH_8__ /* ARM 64-bit */ \ > || (defined __mips && (__mips == 64 || __mips == 4 || __mips == 3)) /* MIPS 64-bit */ \ > ^ > || defined _LP64 || defined __LP64__ /* NetBSD, OpenBSD */ || defined __64BIT__ /* AIX */ || defined _ADDR64 /* Cray */ \ > || (defined __SIZEOF_POINTER__ && __SIZEOF_POINTER__ == 8) /* gcc */ > ^ > # if !defined(__64BIT__) > # define __64BIT__ 1 > # endif > #endif > As you see, BOUND is after the closing paren, after "3))", and point > is at the beginning of "__SIZEOF_POINTER__" a couple of lines further. Yes. BOUND would have been the end of a jit-lock-chunk. > To tell the truth, the Lisp backtrace puzzles me a bit, because the > only call to re-search-forward in font-lock-fontify-keywords-region is > protected by a condition that should have prevented this problem from > happening: > (while (and (< (point) end) > (if (stringp matcher) > (re-search-forward matcher end t) > (funcall matcher end)) > So maybe I'm missing something, or maybe the problematic call to > re-search-forward comes from some macro expansion I didn't identify. Indeed it does. The expansion of the macro is in C Mode's font-lock-keywords. > Let me know if I can provide any more details for your analysis. Will do, but I think you've given me enough to solve this. Thanks! > Thanks. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 25 15:17:07 2017 Received: (at 28850) by debbugs.gnu.org; 25 Oct 2017 19:17:07 +0000 Received: from localhost ([127.0.0.1]:33664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7RAp-0002P5-F5 for submit@debbugs.gnu.org; Wed, 25 Oct 2017 15:17:07 -0400 Received: from ocolin.muc.de ([193.149.48.4]:35689 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1e7RAm-0002Or-Re for 28850@debbugs.gnu.org; Wed, 25 Oct 2017 15:17:06 -0400 Received: (qmail 64835 invoked by uid 3782); 25 Oct 2017 19:16:59 -0000 Received: from acm.muc.de (p548C736A.dip0.t-ipconnect.de [84.140.115.106]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 25 Oct 2017 21:16:58 +0200 Received: (qmail 16090 invoked by uid 1000); 25 Oct 2017 19:11:37 -0000 Date: Wed, 25 Oct 2017 19:11:37 +0000 To: Eli Zaretskii Subject: Re: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20171025191137.GA16060@ACM> References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171024203312.GA5875@ACM> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello again, Eli. On Tue, Oct 24, 2017 at 20:33:12 +0000, Alan Mackenzie wrote: > On Tue, Oct 24, 2017 at 17:46:08 +0300, Eli Zaretskii wrote: > > > Date: Sun, 22 Oct 2017 20:13:40 +0000 > > > Cc: 28850@debbugs.gnu.org > > > From: Alan Mackenzie [ .... ] > > Thanks, this fixes a very large part of the problem, so I think you > > should install this on the release branch. DONE. > > It doesn't solve all of it, though, because I got that breakpoint hit > > again. This time it took much longer before that happened (a sign > > that most of the problem is indeed solved), and the backtrace is > > different. > This is an entirely separate bug. > > Here's the C and the Lisp backtraces, followed by some relevant > > values: > [ .... ]. > > Lisp Backtrace: > > "re-search-forward" (0x88c050) > > 0xad7f328 PVEC_COMPILED > > "font-lock-fontify-keywords-region" (0x88ca70) > > "font-lock-default-fontify-region" (0x88ce60) > > "c-font-lock-fontify-region" (0x88d230) > > "font-lock-fontify-region" (0x88d578) > > 0x13810840 PVEC_COMPILED > > "run-hook-wrapped" (0x88daf0) > > "jit-lock--run-functions" (0x88dee0) > > "jit-lock-fontify-now" (0x88e3e0) > > "jit-lock-stealth-fontify" (0x88e9d0) > > "apply" (0x88e9c8) > > "timer-event-handler" (0x88edb8) > > (gdb) pp current_buffer->name_ > > "platform.h" > > (gdb) pp current_buffer->directory_ > > "d:/utils/lz4-1.7.5/programs/" > > (gdb) p PT > > $1 = 2645 > > (gdb) p bound > > $2 = make_number(2425) > > (gdb) up > > #1 0x011cd2c9 in Fre_search_forward (regexp=XIL(0x800000000adcb1f0), > > bound=..., noerror=..., count=...) at search.c:2271 > > 2271 return search_command (regexp, bound, noerror, count, 1, 1, 0); > > (gdb) pp regexp > > "\\(\\=\\|\\(\\=\\|[^\\]\\)[ > > ]\\)\\s *#\\s *\\(\\(?:\\(?:el\\)?if\\)\\)\\([^[:alnum:]_$]\\|$\\)\\(\\\\\\(.\\| > > [ > > ]\\)\\|[^ > > ]\\)*" > I've tracked down that regexp. It matches "#if" or "#elif" inside > macros. It's used in c-cpp-matchers in cc-fonts.el. > > As you see, point is at 2645, whereas BOUND is at 2425. This happens > > in the file platform.h from the lz4-1.7.5 distribution. Here's the > > relevant part of platform.h with the two locations shown (I added an > > empty line for each "^" marker): > The reason for this is that a generated lambda form with the argument > LIMIT (which would be the end of a jit-lock chunk or similar) internally > binds LIMIT to the end of the current macro. Inside this binding, which > searches for "defined" repeatedly, we go forward to after the last > "defined", as indicated in your source excerpt below. Unfortunately, > this point is beyond the original LIMIT supplied to the lambda, so in the > next re-search-forward, point is the wrong side of this original LIMIT. > This particular bit of CC Mode is "write only" code, and it could take > me some while to disentangle the stack of macros and function generators > which has produced it. I think I'm going to extract this form and > rewrite it more by hand, making it simpler to debug in the future. Actually, it wasn't that difficult to amend that form generator. Would you please try out the patch below, which should apply cleanly to master. > > /* ************************************** > > * Detect 64-bit OS > > * http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros > > ****************************************/ > > #if defined __ia64 || defined _M_IA64 /* Intel Itanium */ \ > > || defined __powerpc64__ || defined __ppc64__ || defined __PPC64__ /* POWER 64-bit */ \ > > || (defined __sparc && (defined __sparcv9 || defined __sparc_v9__ || defined __arch64__)) || defined __sparc64__ /* SPARC 64-bit */ \ > > || defined __x86_64__s || defined _M_X64 /* x86 64-bit */ \ > > || defined __arm64__ || defined __aarch64__ || defined __ARM64_ARCH_8__ /* ARM 64-bit */ \ > > || (defined __mips && (__mips == 64 || __mips == 4 || __mips == 3)) /* MIPS 64-bit */ \ > > ^ > > || defined _LP64 || defined __LP64__ /* NetBSD, OpenBSD */ || defined __64BIT__ /* AIX */ || defined _ADDR64 /* Cray */ \ > > || (defined __SIZEOF_POINTER__ && __SIZEOF_POINTER__ == 8) /* gcc */ > > ^ > > # if !defined(__64BIT__) > > # define __64BIT__ 1 > > # endif > > #endif > > As you see, BOUND is after the closing paren, after "3))", and point > > is at the beginning of "__SIZEOF_POINTER__" a couple of lines further. > Yes. BOUND would have been the end of a jit-lock-chunk. [ .... ] diff -r c2f277772ea2 cc-fonts.el --- a/cc-fonts.el Wed Oct 25 18:00:13 2017 +0000 +++ b/cc-fonts.el Wed Oct 25 18:57:20 2017 +0000 @@ -286,12 +286,17 @@ nil))))) res)))) - (defun c-make-font-lock-search-form (regexp highlights) + (defun c-make-font-lock-search-form (regexp highlights &optional check-point) ;; Return a lisp form which will fontify every occurrence of REGEXP ;; (a regular expression, NOT a function) between POINT and `limit' ;; with HIGHLIGHTS, a list of highlighters as specified on page - ;; "Search-based Fontification" in the elisp manual. - `(while (re-search-forward ,regexp limit t) + ;; "Search-based Fontification" in the elisp manual. If CHECK-POINT + ;; is non-nil, we will check (< (point) limit) in the main loop. + `(while + ,(if check-point + `(and (< (point) limit) + (re-search-forward ,regexp limit t)) + `(re-search-forward ,regexp limit t)) (unless (progn (goto-char (match-beginning 0)) (c-skip-comments-and-strings limit)) @@ -470,7 +475,9 @@ ,(c-make-font-lock-search-form regexp highlights))))) state-stanzas) - ,(c-make-font-lock-search-form (car normal) (cdr normal)) + ;; In the next form, check that point hasn't been moved beyond + ;; `limit' in any of the above stanzas. + ,(c-make-font-lock-search-form (car normal) (cdr normal) t) nil)))) ; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 12:44:49 2017 Received: (at 28850) by debbugs.gnu.org; 26 Oct 2017 16:44:49 +0000 Received: from localhost ([127.0.0.1]:35347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7lGz-0007YD-6k for submit@debbugs.gnu.org; Thu, 26 Oct 2017 12:44:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7lGx-0007Y1-GX for 28850@debbugs.gnu.org; Thu, 26 Oct 2017 12:44:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7lGp-0002eF-BS for 28850@debbugs.gnu.org; Thu, 26 Oct 2017 12:44:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7lGp-0002eA-80; Thu, 26 Oct 2017 12:44:39 -0400 Received: from [176.228.60.248] (port=2235 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7lGo-0007Ge-NJ; Thu, 26 Oct 2017 12:44:39 -0400 Date: Thu, 26 Oct 2017 19:44:28 +0300 Message-Id: <83wp3h7tar.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20171025191137.GA16060@ACM> (message from Alan Mackenzie on Wed, 25 Oct 2017 19:11:37 +0000) Subject: Re: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28850 Cc: 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 25 Oct 2017 19:11:37 +0000 > Cc: 28850@debbugs.gnu.org > From: Alan Mackenzie > > Actually, it wasn't that difficult to amend that form generator. Would > you please try out the patch below, which should apply cleanly to > master. I think you've solved the problem, because I let Emacs run idle for 10 hours, and it didn't hit this error even once. Thanks. Please push to the release branch. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 14:42:16 2017 Received: (at 28850-done) by debbugs.gnu.org; 26 Oct 2017 18:42:16 +0000 Received: from localhost ([127.0.0.1]:35448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7n6e-0003zF-8b for submit@debbugs.gnu.org; Thu, 26 Oct 2017 14:42:16 -0400 Received: from ocolin.muc.de ([193.149.48.4]:59701 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1e7n6c-0003z6-Ep for 28850-done@debbugs.gnu.org; Thu, 26 Oct 2017 14:42:15 -0400 Received: (qmail 36365 invoked by uid 3782); 26 Oct 2017 18:42:12 -0000 Received: from acm.muc.de (p548C77A1.dip0.t-ipconnect.de [84.140.119.161]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 26 Oct 2017 20:42:12 +0200 Received: (qmail 11614 invoked by uid 1000); 26 Oct 2017 18:36:37 -0000 Date: Thu, 26 Oct 2017 18:36:37 +0000 To: Eli Zaretskii Subject: Re: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20171026183637.GB5682@ACM> References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83wp3h7tar.fsf@gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28850-done Cc: 28850-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Eli. On Thu, Oct 26, 2017 at 19:44:28 +0300, Eli Zaretskii wrote: > > Date: Wed, 25 Oct 2017 19:11:37 +0000 > > Cc: 28850@debbugs.gnu.org > > From: Alan Mackenzie > > Actually, it wasn't that difficult to amend that form generator. Would > > you please try out the patch below, which should apply cleanly to > > master. > I think you've solved the problem, .... It was definitely a joint effort. :-) > .... because I let Emacs run idle for 10 hours, and it didn't hit this > error even once. > Thanks. Please push to the release branch. DONE. I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). From unknown Fri Jun 20 07:19:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 24 Nov 2017 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 29 21:51:17 2019 Received: (at control) by debbugs.gnu.org; 30 Apr 2019 01:51:17 +0000 Received: from localhost ([127.0.0.1]:40250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLHvR-0000Gc-BX for submit@debbugs.gnu.org; Mon, 29 Apr 2019 21:51:17 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:33851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLHvP-0000GJ-Vr for control@debbugs.gnu.org; Mon, 29 Apr 2019 21:51:16 -0400 Received: by mail-ed1-f65.google.com with SMTP id a6so10882367edv.1 for ; Mon, 29 Apr 2019 18:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=uJnoiaOJ4rKwbf0gOyWLYqXlJvaCFHEX9cYQOxw5Bbk=; b=eHrymseJH1lvd7g5QsaOIO3MIP+OGUNEDZHF7a0QzJV9XtXQkCsMhq725ELCAt2CEX BwpXCPCiN1wiuA578T6I7gSchhz0yh0jnnOWgOV/jaqhNRYw6N7zjKOsCa76wJR2jFUW r2PMCMebFP1aAYkLCpoHdss7IDsVQ9u7UOS7MF+WIA7nCfWVd93G+TCYEBeEzI9IwTGz +TSoAj4WvcIVcE/WRwZ2LzSFe8RvkU8Ix6VRFDvm+MlqRwosCSfUm0LD9g3HCjXEW8tf xH8h4NNEDzAsg9e5C7W9ih4Z2Jr3vq9kGf8/vi3fIMOIM6CGrTo01kqr+zMWkXo/1C3Y KF2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=uJnoiaOJ4rKwbf0gOyWLYqXlJvaCFHEX9cYQOxw5Bbk=; b=ljvrPNA7aIagwRMOkdriIuJCG1O4+Ol2WQKG/vTnad2+wZk+/JsuNvaiIbl1MHrkkn bv2a3eR3PSH9G2mK9P4F4iNvoYdKseSF+9q36WjkSit1npNg+7Kz46lU/j3n/KBoBksW PBf43Ts5GM+n6IS2eBZw4n5SOscL8O8rS6/F2DmyNQ9869sp7Flr8FgW0A3be/BScddr FLoQfd/+OBXl9sY7A+2E5g0XsgaDs1Z2INQLy2Slt4mMJpcnhsDmlLr6yj0MaQPvzr5Y Z1MgaNl5tXD3xQjHGox9nWCvaYLskzXLvqQSNe3JLXXHE+Lr83bQivCzft8N3LgECmaJ 9jpg== X-Gm-Message-State: APjAAAVDcxVxvyqRukoh+XleknDIY24Cb3ZMgEYLqRkpvcRuFi83SdXM g+Y8GqscT+suP0ehyjeqSZZwbQ== X-Google-Smtp-Source: APXvYqyk6+WCQsh0FLFBDzlrm/QR3F1myXUP601FXkw0rEOk80KpkKjIacF8PnaMoS4DLGw5uS9y4A== X-Received: by 2002:a17:906:f29a:: with SMTP id gu26mr10241475ejb.148.1556589069988; Mon, 29 Apr 2019 18:51:09 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:8cad:ae29:555d:852d]) by smtp.gmail.com with ESMTPSA id x21sm1834433eju.83.2019.04.29.18.51.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Apr 2019 18:51:08 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> Date: Tue, 30 Apr 2019 02:51:03 +0100 In-Reply-To: <83wp3h7tar.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Oct 2017 19:44:28 +0300") Message-ID: <87tvegz2ew.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: Alan Mackenzie , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) unarchive 28850 found 28850 27.0.50 quit Eli Zaretskii writes: >> Date: Wed, 25 Oct 2017 19:11:37 +0000 >> Cc: 28850@debbugs.gnu.org >> From: Alan Mackenzie >>=20 >> Actually, it wasn't that difficult to amend that form generator. Would >> you please try out the patch below, which should apply cleanly to >> master. > > I think you've solved the problem, because I let Emacs run idle for 10 > hours, and it didn't hit this error even once. It seems to have returned in some way. I can't reproduce this on Emacs 26, but on latest master, the following steps: 0. emacs -Q 1. (progn (setq debug-on-error t) (setq jit-lock-stealth-nice nil) (setq jit-lock-stealth-time 0) (find-function #'next-property-change)) 2. C-x C-e almost immediately lead to the following backtrace: Debugger entered--Lisp error: (error "Invalid search bound (wrong side of p= oint)") search-forward-regexp("\\<\\(\\(?:enum\\)\\)\\>[^][{};/#=3D]*{" 1673 t) c-font-lock-enum-body(1673) font-lock-fontify-keywords-region(1123 1673 nil) font-lock-default-fontify-region(1123 1673 nil) c-font-lock-fontify-region(1173 1673 nil) font-lock-fontify-region(1173 1673) #f(compiled-function (fun) #)(font-lock-fontify-= region) run-hook-wrapped(#f(compiled-function (fun) #) f= ont-lock-fontify-region) jit-lock--run-functions(1173 1673) jit-lock-fontify-now(1173 1673) jit-lock-stealth-fontify(t) apply(jit-lock-stealth-fontify t) timer-event-handler([t 0 0 974323 nil jit-lock-stealth-fontify (t) idle 2= 61000]) I'm not sure if this says anything, but when the *Backtrace* buffer is displayed, the textprop.c buffer is marked as modified. Could this be related to the before/after change machinery? A similar error I occasionally see, but have not yet figured out how to reproduce: Error during redisplay: (jit-lock-function 19569) signaled (error "Invalid search bound (wrong side of point)") Thanks, --=20 Basil In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll= bars) of 2019-04-30 built on thunk Repository revision: f478082f9ff22ff41fbd9616ebea75757f9a0311 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 System Description: Debian GNU/Linux buster/sid Configured using: 'configure 'CC=3Dccache gcc' 'CFLAGS=3D-O2 -march=3Dnative' --config-cache --prefix=3D/home/blc/.local --with-mailutils --with-x-toolkit=3Dlucid --with-modules --with-file-notification=3Dyes --with-x' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Package: CC Mode 5.33.2 (C/*l) Buffer Style: GNU c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-st= ring-delim gen-comment-delim syntax-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 0) c-indent-comment-alist '((anchored-comment column . 0) (end-block space . = 1) (cpp-end-block space . 2)) c-indent-comments-syntactically-p nil c-block-comment-prefix "" c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+") (other . "//+\\|\\**")) c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc)) c-cleanup-list '(scope-operator) c-hanging-braces-alist '((substatement-open before after) (arglist-cont-no= nempty)) c-hanging-colons-alist nil c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) c-backslash-column 48 c-backslash-max-column 72 c-special-indent-hook '(c-gnu-impose-minimum) c-label-minimum-indentation 1 c-offsets-alist '((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . c-lineup-inexpr-block) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call + ) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist) (arglist-cont c-lineup-gcc-asm-reg 0) (comment-intro c-lineup-knr-region-comment c-lineup-comment) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . 0) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first c-lineup-topmost-intro-cont c-lineup-gnu-DEFUN-intro-cont ) (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ + ) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-cont . +) (statement-case-open . +) (label . 0) (substatement-label . 0) (substatement-open . +) (knr-argdecl-intro . 5) (statement-block-intro . +) ) c-buffer-is-cc-mode 'c-mode c-tab-always-indent t c-syntactic-indentation t c-syntactic-indentation-in-macros t c-ignore-auto-fill '(string cpp code) c-auto-align-backslashes t c-backspace-function 'backward-delete-char-untabify c-delete-function 'delete-char c-electric-pound-behavior nil c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu")) c-enable-xemacs-performance-kludge-p nil c-old-style-variable-behavior nil defun-prompt-regexp nil tab-width 8 comment-column 32 parse-sexp-ignore-comments t parse-sexp-lookup-properties t auto-fill-function nil comment-multi-line t comment-start-skip "\\(//+\\|/\\*+\\)\\s *" fill-prefix nil fill-column 70 paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" adaptive-fill-mode t adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([ ]*\\([-=E2=80=93!|#%= ;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ ]*\\)*\\)" ) From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 29 21:59:33 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 01:59:33 +0000 Received: from localhost ([127.0.0.1]:40270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLI3R-0000Tm-7A for submit@debbugs.gnu.org; Mon, 29 Apr 2019 21:59:33 -0400 Received: from mail-ed1-f41.google.com ([209.85.208.41]:45531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLI3P-0000TX-Kp for 28850@debbugs.gnu.org; Mon, 29 Apr 2019 21:59:32 -0400 Received: by mail-ed1-f41.google.com with SMTP id g57so4290192edc.12 for <28850@debbugs.gnu.org>; Mon, 29 Apr 2019 18:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:date:references:user-agent :message-id:mime-version:content-transfer-encoding; bh=39/K6N4lH5FM3STScfi9zsl1zRU/O/GSMw+yTZAdpFg=; b=K3nfDhejxmre9OuM/yC8oA8xdatdZ9jdzniOnYTk/lg+zaRvTuq8bhDyLhvcpwywqq EmwWho8xv/j12vitbQl4ZiB6zJvvBvT6xKL1PA8iRZkTgyzgfb0v+e2va/VJSXXl9rL+ ZaIluPWGaDugkRwHNw3G/8a7aizQNVYOKg9r04ajYdCFMntLNj1LkRRAC7vMbqcGqFvx /ZBQu74f+QSPDhL8HWIrA7g07VzMEfsp8ECOBbDdFJ3hRCG85tpWKLuKI9UttTjLQ9XT typYErbfy+gWdDin2yzUD99ucThzyvQbSVQuwiyZ2Uw+gfc50pnSjEDa49AtV4wWYLpD 0K8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:references :user-agent:message-id:mime-version:content-transfer-encoding; bh=39/K6N4lH5FM3STScfi9zsl1zRU/O/GSMw+yTZAdpFg=; b=TX+TTuKQ3ZVJYGzOCtpkBfOW/k20AUs9BhM8Zypr+KMSJVK6f5MJKw5MMsijM0vKXR yUqWH8W3WdBw25tAK7drnSiWheKqx5RzlXWxoeOap8NCn5vEISGNypAYlppDGgOLgfsh d80BUk1QvON4AZ1WfU6PZCOfMEWdtkCE6K1qC9a7ZBYT9wK1225275jN4lcVG0qZdxXm HgfQNEm2Kr1are1MjKVJzRI4teHj/m6ZiC31HXaK1RhyVLyIv6inGezlglZVGhpT/8FS fXG/0nHjxZCcS6lJ1XcftEjzBVhuItIxv++B+DiECFnVO+fu6A59BX0gwvLPVj1PNeIW +3Vg== X-Gm-Message-State: APjAAAWyOS9hkXE4q7iwHF3bl3gKbe58I4p5FbgbyEmjYq6sjdIugpJx 4O6y3VmM9i6dGLsiqUznp4bHQw== X-Google-Smtp-Source: APXvYqxjmqkNMMcsRWl0X8MYqSznTt+wBR/6ONO0MGu9yTMaHTSsnJZXI6cXASsgCir8iOUo+tlcIA== X-Received: by 2002:a17:906:2606:: with SMTP id h6mr8751850ejc.211.1556589565453; Mon, 29 Apr 2019 18:59:25 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:8cad:ae29:555d:852d]) by smtp.gmail.com with ESMTPSA id m4sm9818330ede.0.2019.04.29.18.59.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Apr 2019 18:59:24 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") In-Reply-To: <83wp3h7tar.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Oct 2017 19:44:28 +0300") Date: Tue, 30 Apr 2019 02:51:03 +0100 References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Received: from localhost ([2a02:8084:20e2:c380:8cad:ae29:555d:852d]) by smtp.gmail.com with ESMTPSA id x21sm1834433eju.83.2019.04.29.18.51.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Apr 2019 18:51:08 -0700 (PDT) X-TUID: qLxIYn5VH3+m Message-ID: <87o94oz210.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: Alan Mackenzie , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Date: Wed, 25 Oct 2017 19:11:37 +0000 >> Cc: 28850@debbugs.gnu.org >> From: Alan Mackenzie >>=20 >> Actually, it wasn't that difficult to amend that form generator. Would >> you please try out the patch below, which should apply cleanly to >> master. > > I think you've solved the problem, because I let Emacs run idle for 10 > hours, and it didn't hit this error even once. It seems to have returned in some way. I can't reproduce this on Emacs 26, but on latest master, the following steps: 0. emacs -Q 1. (progn (setq debug-on-error t) (setq jit-lock-stealth-nice nil) (setq jit-lock-stealth-time 0) (find-function #'next-property-change)) 2. C-x C-e almost immediately lead to the following backtrace: Debugger entered--Lisp error: (error "Invalid search bound (wrong side of p= oint)") search-forward-regexp("\\<\\(\\(?:enum\\)\\)\\>[^][{};/#=3D]*{" 1673 t) c-font-lock-enum-body(1673) font-lock-fontify-keywords-region(1123 1673 nil) font-lock-default-fontify-region(1123 1673 nil) c-font-lock-fontify-region(1173 1673 nil) font-lock-fontify-region(1173 1673) #f(compiled-function (fun) #)(font-lock-fontify-= region) run-hook-wrapped(#f(compiled-function (fun) #) f= ont-lock-fontify-region) jit-lock--run-functions(1173 1673) jit-lock-fontify-now(1173 1673) jit-lock-stealth-fontify(t) apply(jit-lock-stealth-fontify t) timer-event-handler([t 0 0 974323 nil jit-lock-stealth-fontify (t) idle 2= 61000]) I'm not sure if this says anything, but when the *Backtrace* buffer is displayed, the textprop.c buffer is marked as modified. Could this be related to the before/after change machinery? A similar error I occasionally see, but have not yet figured out how to reproduce: Error during redisplay: (jit-lock-function 19569) signaled (error "Invalid search bound (wrong side of point)") Thanks, --=20 Basil In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll= bars) of 2019-04-30 built on thunk Repository revision: f478082f9ff22ff41fbd9616ebea75757f9a0311 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 System Description: Debian GNU/Linux buster/sid Configured using: 'configure 'CC=3Dccache gcc' 'CFLAGS=3D-O2 -march=3Dnative' --config-cache --prefix=3D/home/blc/.local --with-mailutils --with-x-toolkit=3Dlucid --with-modules --with-file-notification=3Dyes --with-x' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Package: CC Mode 5.33.2 (C/*l) Buffer Style: GNU c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-st= ring-delim gen-comment-delim syntax-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 0) c-indent-comment-alist '((anchored-comment column . 0) (end-block space . = 1) (cpp-end-block space . 2)) c-indent-comments-syntactically-p nil c-block-comment-prefix "" c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+") (other . "//+\\|\\**")) c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc)) c-cleanup-list '(scope-operator) c-hanging-braces-alist '((substatement-open before after) (arglist-cont-no= nempty)) c-hanging-colons-alist nil c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) c-backslash-column 48 c-backslash-max-column 72 c-special-indent-hook '(c-gnu-impose-minimum) c-label-minimum-indentation 1 c-offsets-alist '((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . c-lineup-inexpr-block) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call + ) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist) (arglist-cont c-lineup-gcc-asm-reg 0) (comment-intro c-lineup-knr-region-comment c-lineup-comment) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . 0) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first c-lineup-topmost-intro-cont c-lineup-gnu-DEFUN-intro-cont ) (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ + ) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-cont . +) (statement-case-open . +) (label . 0) (substatement-label . 0) (substatement-open . +) (knr-argdecl-intro . 5) (statement-block-intro . +) ) c-buffer-is-cc-mode 'c-mode c-tab-always-indent t c-syntactic-indentation t c-syntactic-indentation-in-macros t c-ignore-auto-fill '(string cpp code) c-auto-align-backslashes t c-backspace-function 'backward-delete-char-untabify c-delete-function 'delete-char c-electric-pound-behavior nil c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu")) c-enable-xemacs-performance-kludge-p nil c-old-style-variable-behavior nil defun-prompt-regexp nil tab-width 8 comment-column 32 parse-sexp-ignore-comments t parse-sexp-lookup-properties t auto-fill-function nil comment-multi-line t comment-start-skip "\\(//+\\|/\\*+\\)\\s *" fill-prefix nil fill-column 70 paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" adaptive-fill-mode t adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([ ]*\\([-=E2=80=93!|#%= ;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ ]*\\)*\\)" ) From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 05:24:32 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 09:24:32 +0000 Received: from localhost ([127.0.0.1]:40631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLP03-0006Dq-Uz for submit@debbugs.gnu.org; Tue, 30 Apr 2019 05:24:32 -0400 Received: from colin.muc.de ([193.149.48.1]:52935 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hLP01-0006Dg-7k for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 05:24:30 -0400 Received: (qmail 78363 invoked by uid 3782); 30 Apr 2019 09:24:27 -0000 Received: from acm.muc.de (p4FE15EC5.dip0.t-ipconnect.de [79.225.94.197]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 30 Apr 2019 11:24:26 +0200 Received: (qmail 4334 invoked by uid 1000); 30 Apr 2019 09:24:25 -0000 Date: Tue, 30 Apr 2019 09:24:25 +0000 To: "Basil L. Contovounesios" Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190430092425.GA4142@ACM> References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o94oz210.fsf@tcd.ie> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: Eli Zaretskii , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Basil. On Tue, Apr 30, 2019 at 02:51:03 +0100, Basil L. Contovounesios wrote: > Eli Zaretskii writes: > >> Date: Wed, 25 Oct 2017 19:11:37 +0000 > >> Cc: 28850@debbugs.gnu.org > >> From: Alan Mackenzie > >> Actually, it wasn't that difficult to amend that form generator. Would > >> you please try out the patch below, which should apply cleanly to > >> master. > > I think you've solved the problem, because I let Emacs run idle for 10 > > hours, and it didn't hit this error even once. > It seems to have returned in some way. I can't reproduce this on Emacs > 26, but on latest master, the following steps: > 0. emacs -Q > 1. (progn (setq debug-on-error t) > (setq jit-lock-stealth-nice nil) > (setq jit-lock-stealth-time 0) > (find-function #'next-property-change)) > 2. C-x C-e > almost immediately lead to the following backtrace: > Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)") > search-forward-regexp("\\<\\(\\(?:enum\\)\\)\\>[^][{};/#=]*{" 1673 t) > c-font-lock-enum-body(1673) > font-lock-fontify-keywords-region(1123 1673 nil) > font-lock-default-fontify-region(1123 1673 nil) > c-font-lock-fontify-region(1173 1673 nil) > font-lock-fontify-region(1173 1673) > #f(compiled-function (fun) #)(font-lock-fontify-region) > run-hook-wrapped(#f(compiled-function (fun) #) font-lock-fontify-region) > jit-lock--run-functions(1173 1673) > jit-lock-fontify-now(1173 1673) > jit-lock-stealth-fontify(t) > apply(jit-lock-stealth-fontify t) > timer-event-handler([t 0 0 974323 nil jit-lock-stealth-fontify (t) idle 261000]) Yes, I see this too, on master. However, I don't see it on Emacs 26.2, even while running an up to date CC Mode. So I think it's likely to be the breaking of some (possibly implicit) interface requirement with CC Mode. > I'm not sure if this says anything, but when the *Backtrace* buffer is > displayed, the textprop.c buffer is marked as modified. Could this be > related to the before/after change machinery? It could. There's a macro in CC Mode, c-tentative-buffer-changes, which executes a ,@body, then undoes its changes when the result of ,@body is nil. Possibly the exception happened there. > A similar error I occasionally see, but have not yet figured out how to > reproduce: > Error during redisplay: (jit-lock-function 19569) > signaled (error "Invalid search bound (wrong side of point)") Maybe that's the same bug. :-) I'll look into this problem with find-function. > Thanks, > -- > Basil [ .... ] -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 07:33:11 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 11:33:11 +0000 Received: from localhost ([127.0.0.1]:40724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLR0Z-0003IX-50 for submit@debbugs.gnu.org; Tue, 30 Apr 2019 07:33:11 -0400 Received: from colin.muc.de ([193.149.48.1]:61483 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hLR0T-0003IJ-WF for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 07:33:06 -0400 Received: (qmail 10420 invoked by uid 3782); 30 Apr 2019 11:33:04 -0000 Received: from acm.muc.de (p4FE15EC5.dip0.t-ipconnect.de [79.225.94.197]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 30 Apr 2019 13:33:02 +0200 Received: (qmail 5670 invoked by uid 1000); 30 Apr 2019 11:33:02 -0000 Date: Tue, 30 Apr 2019 11:33:02 +0000 To: "Basil L. Contovounesios" Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190430113302.GB4142@ACM> References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o94oz210.fsf@tcd.ie> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: Eli Zaretskii , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Basil. On Tue, Apr 30, 2019 at 02:51:03 +0100, Basil L. Contovounesios wrote: > Eli Zaretskii writes: > >> Date: Wed, 25 Oct 2017 19:11:37 +0000 > >> Cc: 28850@debbugs.gnu.org > >> From: Alan Mackenzie > >> Actually, it wasn't that difficult to amend that form generator. Would > >> you please try out the patch below, which should apply cleanly to > >> master. > > I think you've solved the problem, because I let Emacs run idle for 10 > > hours, and it didn't hit this error even once. > It seems to have returned in some way. I can't reproduce this on Emacs > 26, but on latest master, the following steps: > 0. emacs -Q > 1. (progn (setq debug-on-error t) > (setq jit-lock-stealth-nice nil) > (setq jit-lock-stealth-time 0) > (find-function #'next-property-change)) > 2. C-x C-e > almost immediately lead to the following backtrace: > Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)") > search-forward-regexp("\\<\\(\\(?:enum\\)\\)\\>[^][{};/#=]*{" 1673 t) > c-font-lock-enum-body(1673) > font-lock-fontify-keywords-region(1123 1673 nil) > font-lock-default-fontify-region(1123 1673 nil) > c-font-lock-fontify-region(1173 1673 nil) > font-lock-fontify-region(1173 1673) > #f(compiled-function (fun) #)(font-lock-fontify-region) > run-hook-wrapped(#f(compiled-function (fun) #) font-lock-fontify-region) > jit-lock--run-functions(1173 1673) > jit-lock-fontify-now(1173 1673) > jit-lock-stealth-fontify(t) > apply(jit-lock-stealth-fontify t) > timer-event-handler([t 0 0 974323 nil jit-lock-stealth-fontify (t) idle 261000]) The cause of this is a (search-forward-regexp limit t) in a loop, where the code fails to check (< (point) limit) at the start. In textprop.c in master, it so happens that the last successful iteration of the loop leaves point beyond limit. So we get the exception. This is easy to correct, but first I'm going to check for all the other places where the same mistake occurs. Expect a patch soon! [ .... ] > Thanks, > -- > Basil -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 08:57:25 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 12:57:25 +0000 Received: from localhost ([127.0.0.1]:40824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLSK5-0006Io-L5 for submit@debbugs.gnu.org; Tue, 30 Apr 2019 08:57:25 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:40903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLSK4-0006Ib-FB for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 08:57:24 -0400 Received: by mail-wm1-f43.google.com with SMTP id h11so3703641wmb.5 for <28850@debbugs.gnu.org>; Tue, 30 Apr 2019 05:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Iv4CoOtW9v5XPEoZZG6rWDkcn/v1sRisNxs9c+NLR28=; b=VsEaYnKlAuCBAaCnB5FXp5GxNFQ3YMTzaJVtbVoFNxsConpI9R9UfHIxZ0IJhRc1Fo hfB+dHtSdrzZ2cMZYqPmrPUnZbpf4uz0gho9UyWWfXRtRN5Zi3sCtnGhSSzrH6Hd7TG9 HxMXTshqXXTzaoQFSRpXn24rwODc+1AB0Gnm+UPzeIghQ+xPJWThLqjCPQrXBTs9FPjC OezCxqBcorJ4LZ2b/cGAngTUzdhW24qWA0XtyJgZJZkV5Hrh0laJzAoihR+Se/gK+CzN /hRGprTNSXASG1OcXbkAsrate97512uzXHOYYE0h1BzEwFXgIkDkUBvIVABxsDNo+qu+ voIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Iv4CoOtW9v5XPEoZZG6rWDkcn/v1sRisNxs9c+NLR28=; b=UnAquDHY9y2IuOXr3+yQpUujStnQ8UzQQ+xA9NQeINbYWxnYpW4RQMWoVfDHsCcVhD XVfewWLAgWEq0JnKOTOzzsnJ9vW3BWtHvY2J5ni+72BqHvDIHalQCyATT2JW8ajMu6DK uvowhY55DhrPFq1jOmaZa8NeXkVwGwSGBaBY6gIxj7G+eu+Ksk0IONjx4QS2UXyY0ixz HbqZThMyc6ibwu0TUuIYynzW6+IjKeeOKdsL+Ufv1M5AzSSda81WjWMQCjjEzDfzcQbc N+V1s5KQ18kkplvPYS60lHEM6PamlgzjFfavFLUBnPUcoh4NqRl0krPokcnIaDo8QWgG 8/NA== X-Gm-Message-State: APjAAAUd1mC3dWzwUpZEGsJ/vyoczMr9HnOjdBNoISbO8yoERg4peGWN IShCo+8XoJ72nymRNziL1bd8ng== X-Google-Smtp-Source: APXvYqwNGRzhO+f36nwVIyvR97RDXseYTbuv255NQBPiqNdIhJzno5zTq5fqutTRus/tZDubAF5Qzg== X-Received: by 2002:a1c:ed12:: with SMTP id l18mr3290566wmh.13.1556629038606; Tue, 30 Apr 2019 05:57:18 -0700 (PDT) Received: from localhost ([163.172.211.46]) by smtp.gmail.com with ESMTPSA id c9sm10455234wrv.62.2019.04.30.05.57.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Apr 2019 05:57:17 -0700 (PDT) From: "Basil L. Contovounesios" To: Alan Mackenzie Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> Date: Tue, 30 Apr 2019 13:57:16 +0100 In-Reply-To: <20190430113302.GB4142@ACM> (Alan Mackenzie's message of "Tue, 30 Apr 2019 11:33:02 +0000") Message-ID: <8736lzirbn.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Alan Mackenzie writes: > The cause of this is a (search-forward-regexp limit t) in a loop, where > the code fails to check (< (point) limit) at the start. In textprop.c in > master, it so happens that the last succ [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: muc.de] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [163.172.211.46 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.43 listed in list.dnswl.org] X-Debbugs-Envelope-To: 28850 Cc: Eli Zaretskii , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Alan Mackenzie writes: > The cause of this is a (search-forward-regexp limit t) in a loop, where > the code fails to check (< (point) limit) at the start. In textprop.c in > master, it so happens that the last succ [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: muc.de] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.43 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [163.172.211.46 listed in zen.spamhaus.org] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Alan Mackenzie writes: > The cause of this is a (search-forward-regexp limit t) in a loop, where > the code fails to check (< (point) limit) at the start. In textprop.c in > master, it so happens that the last successful iteration of the loop > leaves point beyond limit. So we get the exception. > > This is easy to correct, but first I'm going to check for all the other > places where the same mistake occurs. Expect a patch soon! How exciting! Thanks for looking into this so quickly. -- Basil From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 09:32:07 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 13:32:08 +0000 Received: from localhost ([127.0.0.1]:40850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLSrf-0007CK-MI for submit@debbugs.gnu.org; Tue, 30 Apr 2019 09:32:07 -0400 Received: from colin.muc.de ([193.149.48.1]:28409 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hLSrd-0007CC-Jh for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 09:32:06 -0400 Received: (qmail 51205 invoked by uid 3782); 30 Apr 2019 13:32:04 -0000 Received: from acm.muc.de (p4FE15EC5.dip0.t-ipconnect.de [79.225.94.197]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 30 Apr 2019 15:32:03 +0200 Received: (qmail 22469 invoked by uid 1000); 30 Apr 2019 13:32:03 -0000 Date: Tue, 30 Apr 2019 13:32:03 +0000 To: "Basil L. Contovounesios" Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190430133203.GC4142@ACM> References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8736lzirbn.fsf@tcd.ie> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: Eli Zaretskii , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Basil. On Tue, Apr 30, 2019 at 13:57:16 +0100, Basil L. Contovounesios wrote: > Alan Mackenzie writes: > > The cause of this is a (search-forward-regexp limit t) in a loop, where > > the code fails to check (< (point) limit) at the start. In textprop.c in > > master, it so happens that the last successful iteration of the loop > > leaves point beyond limit. So we get the exception. > > This is easy to correct, but first I'm going to check for all the other > > places where the same mistake occurs. Expect a patch soon! > How exciting! Thanks for looking into this so quickly. I've just committed a patch to all the usual places (including the savannah master) which I'm confident will have fixed the bug. Feel free to test this (and tell me what isn't quite fixed ;-). I'm just thinking, maybe this fix should have gone into the emacs-26 branch. Not sure about that. > -- > Basil -- Alan Mackenzie (Nuremberg, Geramny). From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 09:44:38 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 13:44:38 +0000 Received: from localhost ([127.0.0.1]:40856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLT3l-0007VJ-Rp for submit@debbugs.gnu.org; Tue, 30 Apr 2019 09:44:38 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:36069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLT3j-0007V5-Tp for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 09:44:36 -0400 Received: by mail-wr1-f47.google.com with SMTP id o4so9157759wra.3 for <28850@debbugs.gnu.org>; Tue, 30 Apr 2019 06:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=28bPAz3pzdDEXeg/7RAN9ZTeUIvhLVZXdcfCvF4E2P8=; b=NvAvBZjhjv0DA0tyqU+87ccjeDaboxnOvIxikCoq+LkF1xNBUpcmgOPpyycD5/woQE cu5ZuSdi9pCWPCPgbKgRFSGKsoFWHWesCliLuEz22Gkx1zapBMLAIt3uGzRR7vALWtsB AVBLoDwacCXYsJoICexV2zTsE+VMWSvAA/z/bcPF2r0REp/K3tB5XUPlixa+iUDzVZPY aqkl6W1CKKBYFBJ/nL+9A7TdGJE2gHGkgvpRyrzxJAArGZBEO9cjcf8lwn0vBGlG/gWl QpDJ3LVem6/KepU8jYQ1zxDAUdXxmQFowZJmqPGMXZUGERN82aaQCLDxyLEeZ+W1HrxH Z7Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=28bPAz3pzdDEXeg/7RAN9ZTeUIvhLVZXdcfCvF4E2P8=; b=k8derzyg1OwKmZJUlgoqNTF9IMNq1r7sG1OHBbPvWUCdnfDRI078nei982hiTJNX7i Itm9lQKu3gh5CmtYYytdSz+NXD2O70q2lYNR6Q72MoNbj8Xeyx+YrOwFfcIwz17mgTjh A90ENUwTysc2X4PZSkE4U5r10xoKBD3QdppzcHNM3AzZ90gxIHFreVy41Ps4qyceGaql zP0O3m1os4FQCD33tAn6sKQn9c75N0/MJGrdHBIvrL0JAeClgTgv/gSTsch8hYZahevU n7L0i+F2/asVwJqbfirz8sLPH3h28xopHp+FJQ5voOcE2j/1mqaM2Kq8EhDVrbH9aUMe z+lA== X-Gm-Message-State: APjAAAWw28eBjhJiGv0FzWaQ1jp8y1UoIwPuLnP1f/R3O75yZ6yHRm6T eux/qLpBSE6I2JGYg+kqVfH4Cg== X-Google-Smtp-Source: APXvYqyAKuTW/ZktmZwuU8LDmQbWizQsgyxKZLIUIEUfKy0BeLr5MQ+WAyzlO98c/dSTGhQfng3AhA== X-Received: by 2002:adf:db8a:: with SMTP id u10mr32745793wri.82.1556631870120; Tue, 30 Apr 2019 06:44:30 -0700 (PDT) Received: from localhost ([163.172.211.46]) by smtp.gmail.com with ESMTPSA id b11sm4693391wmh.29.2019.04.30.06.44.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Apr 2019 06:44:29 -0700 (PDT) From: "Basil L. Contovounesios" To: Alan Mackenzie Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <20190430133203.GC4142@ACM> Date: Tue, 30 Apr 2019 14:44:27 +0100 In-Reply-To: <20190430133203.GC4142@ACM> (Alan Mackenzie's message of "Tue, 30 Apr 2019 13:32:03 +0000") Message-ID: <87wojb7glg.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Alan Mackenzie writes: > Hello Basil. > > On Tue, Apr 30, 2019 at 13:57:16 +0100, Basil L. Contovounesios wrote: >> Alan Mackenzie writes: > >> > The cause of this is a (search-forward-regexp limit t) [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: muc.de] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [163.172.211.46 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.47 listed in list.dnswl.org] X-Debbugs-Envelope-To: 28850 Cc: Eli Zaretskii , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Alan Mackenzie writes: > Hello Basil. > > On Tue, Apr 30, 2019 at 13:57:16 +0100, Basil L. Contovounesios wrote: >> Alan Mackenzie writes: > >> > The cause of this is a (search-forward-regexp limit t) [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: muc.de] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.47 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [163.172.211.46 listed in zen.spamhaus.org] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Alan Mackenzie writes: > Hello Basil. > > On Tue, Apr 30, 2019 at 13:57:16 +0100, Basil L. Contovounesios wrote: >> Alan Mackenzie writes: > >> > The cause of this is a (search-forward-regexp limit t) in a loop, where >> > the code fails to check (< (point) limit) at the start. In textprop.c in >> > master, it so happens that the last successful iteration of the loop >> > leaves point beyond limit. So we get the exception. > >> > This is easy to correct, but first I'm going to check for all the other >> > places where the same mistake occurs. Expect a patch soon! > >> How exciting! Thanks for looking into this so quickly. > > I've just committed a patch to all the usual places (including the > savannah master) which I'm confident will have fixed the bug. Feel free > to test this (and tell me what isn't quite fixed ;-). Thanks, I've had no problems so far. I definitely can't reproduce the error in the OP any more, so you can close the report again as far as I'm concerned. > I'm just thinking, maybe this fix should have gone into the emacs-26 > branch. Not sure about that. The patch looks unproblematic enough to me, but that is, of course, Eli's call. Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 11:26:42 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 15:26:42 +0000 Received: from localhost ([127.0.0.1]:42131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLUeY-0001pp-5D for submit@debbugs.gnu.org; Tue, 30 Apr 2019 11:26:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLUeV-0001pN-Vh for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 11:26:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLUeQ-0008IA-6O; Tue, 30 Apr 2019 11:26:34 -0400 Received: from [176.228.60.248] (port=4268 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLUeO-0006Va-H9; Tue, 30 Apr 2019 11:26:34 -0400 Date: Tue, 30 Apr 2019 18:26:26 +0300 Message-Id: <83h8afsee5.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-reply-to: <8736lzirbn.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28850 Cc: acm@muc.de, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Cc: Eli Zaretskii , <28850@debbugs.gnu.org> > Date: Tue, 30 Apr 2019 13:57:16 +0100 > > Alan Mackenzie writes: > > > The cause of this is a (search-forward-regexp limit t) in a loop, where > > the code fails to check (< (point) limit) at the start. In textprop.c in > > master, it so happens that the last successful iteration of the loop > > leaves point beyond limit. So we get the exception. > > > > This is easy to correct, but first I'm going to check for all the other > > places where the same mistake occurs. Expect a patch soon! > > How exciting! Thanks for looking into this so quickly. Seconded. FWIW, I think I see something similar in Emacs 26.2, I will try to catch it one of these days. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 11:30:58 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 15:30:58 +0000 Received: from localhost ([127.0.0.1]:42160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLUig-0001yV-6z for submit@debbugs.gnu.org; Tue, 30 Apr 2019 11:30:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLUie-0001yI-06 for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 11:30:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLUiT-0001x3-5u; Tue, 30 Apr 2019 11:30:45 -0400 Received: from [176.228.60.248] (port=4532 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLUiR-0006Bg-6r; Tue, 30 Apr 2019 11:30:44 -0400 Date: Tue, 30 Apr 2019 18:30:37 +0300 Message-Id: <83ef5jse76.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20190430133203.GC4142@ACM> (message from Alan Mackenzie on Tue, 30 Apr 2019 13:32:03 +0000) Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <20190430133203.GC4142@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28850 Cc: contovob@tcd.ie, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 30 Apr 2019 13:32:03 +0000 > Cc: Eli Zaretskii , 28850@debbugs.gnu.org > From: Alan Mackenzie > > I'm just thinking, maybe this fix should have gone into the emacs-26 > branch. Not sure about that. Didn't you say that the problem you fixed didn't exist in Emacs 26.2? From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 11:35:28 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 15:35:28 +0000 Received: from localhost ([127.0.0.1]:42172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLUn2-00025N-F6 for submit@debbugs.gnu.org; Tue, 30 Apr 2019 11:35:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLUn1-00025C-5r for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 11:35:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLUmv-0004sp-Nv; Tue, 30 Apr 2019 11:35:21 -0400 Received: from [176.228.60.248] (port=4814 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLUmu-0005MI-W3; Tue, 30 Apr 2019 11:35:21 -0400 Date: Tue, 30 Apr 2019 18:35:15 +0300 Message-Id: <83d0l3sdzg.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-reply-to: <87wojb7glg.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <20190430133203.GC4142@ACM> <87wojb7glg.fsf@tcd.ie> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28850 Cc: acm@muc.de, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Cc: Eli Zaretskii , <28850@debbugs.gnu.org> > Date: Tue, 30 Apr 2019 14:44:27 +0100 > > > I'm just thinking, maybe this fix should have gone into the emacs-26 > > branch. Not sure about that. > > The patch looks unproblematic enough to me, but that is, of course, > Eli's call. Btw, I'm not sure I understand the need for calling (point) in that patch. Both functions return the value of point, and they both return LIMIT if the fail to find a match, so just testing the return value against LIMIT should be enough, no? From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 11:43:56 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 15:43:56 +0000 Received: from localhost ([127.0.0.1]:42201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLUvD-0002Ki-5I for submit@debbugs.gnu.org; Tue, 30 Apr 2019 11:43:56 -0400 Received: from colin.muc.de ([193.149.48.1]:29880 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hLUv6-0002JJ-UF for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 11:43:52 -0400 Received: (qmail 96908 invoked by uid 3782); 30 Apr 2019 15:43:45 -0000 Received: from acm.muc.de (p4FE15EC5.dip0.t-ipconnect.de [79.225.94.197]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 30 Apr 2019 17:43:44 +0200 Received: (qmail 23064 invoked by uid 1000); 30 Apr 2019 15:43:44 -0000 Date: Tue, 30 Apr 2019 15:43:44 +0000 To: Eli Zaretskii Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190430154344.GD4142@ACM> References: <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <20190430133203.GC4142@ACM> <83ef5jse76.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83ef5jse76.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: contovob@tcd.ie, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Tue, Apr 30, 2019 at 18:30:37 +0300, Eli Zaretskii wrote: > > Date: Tue, 30 Apr 2019 13:32:03 +0000 > > Cc: Eli Zaretskii , 28850@debbugs.gnu.org > > From: Alan Mackenzie > > I'm just thinking, maybe this fix should have gone into the emacs-26 > > branch. Not sure about that. > Didn't you say that the problem you fixed didn't exist in Emacs 26.2? If I did, what I really meant was I hadn't seen it in 26.2. What triggers the bug is the first enum in textprop.c straddling two jit-lock chunks. This seems not to happen in 26.2's textprop.c. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 11:50:58 2019 Received: (at 28850) by debbugs.gnu.org; 30 Apr 2019 15:50:59 +0000 Received: from localhost ([127.0.0.1]:42217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLV22-0002Ws-K9 for submit@debbugs.gnu.org; Tue, 30 Apr 2019 11:50:58 -0400 Received: from colin.muc.de ([193.149.48.1]:29973 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hLV21-0002Wk-3c for 28850@debbugs.gnu.org; Tue, 30 Apr 2019 11:50:57 -0400 Received: (qmail 99233 invoked by uid 3782); 30 Apr 2019 15:50:53 -0000 Received: from acm.muc.de (p4FE15EC5.dip0.t-ipconnect.de [79.225.94.197]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 30 Apr 2019 17:50:52 +0200 Received: (qmail 23092 invoked by uid 1000); 30 Apr 2019 15:50:52 -0000 Date: Tue, 30 Apr 2019 15:50:52 +0000 To: Eli Zaretskii Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190430155052.GE4142@ACM> References: <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <20190430133203.GC4142@ACM> <87wojb7glg.fsf@tcd.ie> <83d0l3sdzg.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83d0l3sdzg.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: "Basil L. Contovounesios" , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Tue, Apr 30, 2019 at 18:35:15 +0300, Eli Zaretskii wrote: > > From: "Basil L. Contovounesios" > > Cc: Eli Zaretskii , <28850@debbugs.gnu.org> > > Date: Tue, 30 Apr 2019 14:44:27 +0100 > > > I'm just thinking, maybe this fix should have gone into the emacs-26 > > > branch. Not sure about that. > > The patch looks unproblematic enough to me, but that is, of course, > > Eli's call. > Btw, I'm not sure I understand the need for calling (point) in that > patch. Both functions return the value of point, and they both return > LIMIT if they fail to find a match, so just testing the return value > against LIMIT should be enough, no? What happens is the search-forward-regexp finds a match entirely before LIMIT, but the body of the loop processes the entire construct introduced by that match and leaves point at the end of the construct. This can be after LIMIT. Hence the check on (point) before the search-forward-regexp. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 14:49:23 2019 Received: (at 28850) by debbugs.gnu.org; 1 May 2019 18:49:23 +0000 Received: from localhost ([127.0.0.1]:44906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLuIE-0004Iz-NS for submit@debbugs.gnu.org; Wed, 01 May 2019 14:49:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLuIC-0004Il-Qi for 28850@debbugs.gnu.org; Wed, 01 May 2019 14:49:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLuI6-0005pR-Pb; Wed, 01 May 2019 14:49:14 -0400 Received: from [176.228.60.248] (port=1935 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLuI5-00046R-TZ; Wed, 01 May 2019 14:49:14 -0400 Date: Wed, 01 May 2019 21:49:07 +0300 Message-Id: <83y33qovrw.fsf@gnu.org> From: Eli Zaretskii To: acm@muc.de In-reply-to: <83h8afsee5.fsf@gnu.org> (message from Eli Zaretskii on Tue, 30 Apr 2019 18:26:26 +0300) Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <83lgkcgzs9.fsf@gnu.org> <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <83h8afsee5.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28850 Cc: contovob@tcd.ie, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 30 Apr 2019 18:26:26 +0300 > From: Eli Zaretskii > Cc: acm@muc.de, 28850@debbugs.gnu.org > > FWIW, I think I see something similar in Emacs 26.2, I will try to > catch it one of these days. Done. The error messages are slightly different: wrong-type-argument number-or-marker-p nil. It was very hard to debug, but eventually I succeeded to catch a backtrace: Thread 1 hit Breakpoint 5, wrong_type_argument (predicate=XIL(0x9f90), value=XIL(0)) at data.c:146 146 { #0 wrong_type_argument (predicate=XIL(0x9f90), value=XIL(0)) at data.c:146 #1 0x01127519 in CHECK_TYPE (x=XIL(0), predicate=, ok=0) at lisp.h:625 #2 Fadd1 (number=XIL(0)) at data.c:3125 #3 0x011429ba in eval_sub (form=XIL(0xc000000018bb6b60)) at eval.c:2241 #4 0x01142768 in eval_sub (form=XIL(0xc000000018bb6b40)) at eval.c:2229 #5 0x01142ee0 in Fprogn (body=) at eval.c:459 #6 0x0113af02 in Fsave_excursion (args=XIL(0xc000000018bb6af0)) at editfns.c:1050 #7 0x01142a9a in eval_sub (form=XIL(0xc000000018bb6b20)) at eval.c:2193 #8 0x0114300b in Fprogn (body=) at eval.c:459 #9 Fcond (args=) at eval.c:439 #10 0x01142a9a in eval_sub (form=XIL(0xc000000018bb6950)) at eval.c:2193 #11 0x01146b24 in Fsetq (args=XIL(0xc000000018bb6930)) at eval.c:517 #12 0x01142a9a in eval_sub (form=XIL(0xc000000018bb6940)) at eval.c:2193 #13 0x01147612 in Fprogn (body=) at eval.c:459 #14 Flet (args=) at eval.c:973 #15 0x01142a9a in eval_sub (form=XIL(0xc000000018bb66d0)) at eval.c:2193 #16 0x01142f53 in Fprogn (body=) at eval.c:459 #17 Fif (args=XIL(0xc000000018b9ff50)) at eval.c:415 #18 0x01142a9a in eval_sub (form=XIL(0xc000000018b9ffa0)) at eval.c:2193 #19 0x01142ee0 in Fprogn (body=) at eval.c:459 #20 0x01141574 in internal_catch (tag=XIL(0x809f040), func=func@entry=0x1142eb2 , arg=XIL(0xc000000018ba0490)) at eval.c:1101 #21 0x0114782a in Fcatch (args=XIL(0xc000000018ba04e0)) at eval.c:1078 #22 0x01142a9a in eval_sub (form=XIL(0xc000000018ba04f0)) at eval.c:2193 #23 0x011477e1 in Fwhile (args=XIL(0xc000000018b1c810)) at eval.c:989 #24 0x01142a9a in eval_sub (form=XIL(0xc000000018b1c840)) at eval.c:2193 #25 0x01142f53 in Fprogn (body=) at eval.c:459 #26 Fif (args=XIL(0xc000000018b7a4b0)) at eval.c:415 #27 0x01142a9a in eval_sub (form=XIL(0xc000000018b7a4c0)) at eval.c:2193 #28 0x01142ee0 in Fprogn (body=) at eval.c:459 #29 0x0113dc1a in Fsave_restriction (body=XIL(0xc000000018bb5160)) at editfns.c:3990 #30 0x01142a9a in eval_sub (form=XIL(0xc000000018bb5170)) at eval.c:2193 #31 0x01147612 in Fprogn (body=) at eval.c:459 #32 Flet (args=) at eval.c:973 #33 0x01142a9a in eval_sub (form=XIL(0xc000000018625d50)) at eval.c:2193 #34 0x0114345d in Fprogn (body=) at eval.c:459 #35 funcall_lambda (fun=XIL(0xc000000018625d40), nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88bbf0) at eval.c:3052 #36 0x0114215a in apply_lambda (fun=, args=, count=, count@entry=84) at eval.c:2913 #37 0x0114263a in eval_sub (form=XIL(0xc00000001c7bd2b0)) at eval.c:2316 #38 0x01146b24 in Fsetq (args=XIL(0xc00000001c7bd2c0)) at eval.c:517 #39 0x01142a9a in eval_sub (form=XIL(0xc00000001c7bd2d0)) at eval.c:2193 #40 0x01142768 in eval_sub (form=XIL(0xc00000001c7bd2e0)) at eval.c:2229 #41 0x01142768 in eval_sub (form=XIL(0xc00000001c7bd2f0)) at eval.c:2229 #42 0x01142e9e in Fand (args=) at eval.c:393 #43 0x01142a9a in eval_sub (form=XIL(0xc00000001c7c5550)) at eval.c:2193 #44 0x011477e1 in Fwhile (args=XIL(0xc00000001c7c5380)) at eval.c:989 #45 0x01142a9a in eval_sub (form=XIL(0xc00000001c7c5390)) at eval.c:2193 #46 0x01147612 in Fprogn (body=) at eval.c:459 #47 Flet (args=) at eval.c:973 #48 0x01142a9a in eval_sub (form=XIL(0xc00000001c7c52c0)) at eval.c:2193 #49 0x01147233 in Fprogn (body=) at eval.c:459 #50 FletX (args=XIL(0xc00000001c7c3ed0)) at eval.c:904 #51 0x01142a9a in eval_sub (form=XIL(0xc00000001c7c3ec0)) at eval.c:2193 #52 0x01142ee0 in Fprogn (body=) at eval.c:459 #53 0x01141574 in internal_catch (tag=XIL(0xfeb19468), func=func@entry=0x1142eb2 , arg=XIL(0xc00000001c7c3e90)) at eval.c:1101 #54 0x0114782a in Fcatch (args=XIL(0xc00000001c7c3ea0)) at eval.c:1078 #55 0x01142a9a in eval_sub (form=XIL(0xc00000001c7c3eb0)) at eval.c:2193 #56 0x0114345d in Fprogn (body=) at eval.c:459 #57 funcall_lambda (fun=XIL(0xc00000001c7c3e80), nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88c810) at eval.c:3052 #58 0x011437c9 in Ffuncall (nargs=2, args=args@entry=0x88c808) at eval.c:2790 #59 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:630 #60 0x01143291 in funcall_lambda (fun=XIL(0xa00000000adfab48), nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88cb00) at eval.c:3059 #61 0x011437c9 in Ffuncall (nargs=2, args=args@entry=0x88caf8) at eval.c:2790 #62 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:630 #63 0x01143291 in funcall_lambda (fun=XIL(0xa000000001324700), nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88d0c0) at eval.c:3059 #64 0x011437c9 in Ffuncall (nargs=4, args=args@entry=0x88d0b8) at eval.c:2790 #65 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:630 #66 0x01143291 in funcall_lambda (fun=XIL(0xa000000001323638), nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88d410) at eval.c:3059 #67 0x011437c9 in Ffuncall (nargs=4, args=args@entry=0x88d408) at eval.c:2790 #68 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:630 #69 0x01143291 in funcall_lambda (fun=XIL(0xa00000000ae74d20), nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x88d740) at eval.c:3059 #70 0x011437c9 in Ffuncall (nargs=4, args=args@entry=0x88d738) at eval.c:2790 #71 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=0, args=, args@entry=0x0) at bytecode.c:630 #72 0x01143291 in funcall_lambda (fun=XIL(0xa000000001323038), nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88d9e8) at eval.c:3059 #73 0x011437c9 in Ffuncall (nargs=3, args=args@entry=0x88d9e0) at eval.c:2790 #74 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=1, args=, args@entry=0x88de08) at bytecode.c:630 #75 0x011433ec in funcall_lambda (fun=, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88de08) at eval.c:2977 #76 0x011437c9 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88de00) at eval.c:2790 #77 0x0114393e in run_hook_wrapped_funcall (nargs=nargs@entry=2, args=args@entry=0x88de00) at eval.c:2503 #78 0x01141a36 in run_hook_with_args (nargs=2, args=0x88de00, funcall=0x114390e ) at eval.c:2584 #79 0x0114389b in Ffuncall (nargs=3, args=args@entry=0x88ddf8) at eval.c:2776 #80 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=2, args=, args@entry=0x88e150) at bytecode.c:630 #81 0x011433ec in funcall_lambda (fun=, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88e150) at eval.c:2977 #82 0x011437c9 in Ffuncall (nargs=3, args=args@entry=0x88e148) at eval.c:2790 #83 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=2, args=, args@entry=0x88e5b0) at bytecode.c:630 #84 0x011433ec in funcall_lambda (fun=, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x88e5b0) at eval.c:2977 #85 0x011437c9 in Ffuncall (nargs=3, args=args@entry=0x88e5a8) at eval.c:2790 #86 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=1, args=, args@entry=0x88ea60) at bytecode.c:630 #87 0x011433ec in funcall_lambda (fun=, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88ea60) at eval.c:2977 #88 0x011437c9 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88ea58) at eval.c:2790 #89 0x01145d67 in Fapply (nargs=2, args=0x88ea58) at eval.c:2353 #90 0x0114389b in Ffuncall (nargs=3, args=args@entry=0x88ea50) at eval.c:2776 #91 0x01189680 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, nargs@entry=1, args=, args@entry=0x88eda8) at bytecode.c:630 #92 0x011433ec in funcall_lambda (fun=, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x88eda8) at eval.c:2977 #93 0x011437c9 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x88eda0) at eval.c:2790 #94 0x011439c7 in call1 (fn=XIL(0xcfc0), arg1=XIL(0xa00000000ae3af70)) at eval.c:2627 #95 0x010bfe7c in timer_check_2 (idle_timers=, timers=) at keyboard.c:4472 #96 timer_check () at keyboard.c:4534 #97 0x010c04a1 in readable_events (flags=flags@entry=1) at keyboard.c:3349 #98 0x010c0e98 in get_input_pending (flags=flags@entry=1) at keyboard.c:6841 #99 0x010c3a53 in detect_input_pending_run_timers ( do_display=do_display@entry=true) at keyboard.c:9961 #100 0x01195175 in wait_reading_process_output (time_limit=, nsecs=nsecs@entry=0, read_kbd=-1, do_display=do_display@entry=true, wait_for_cell=XIL(0), wait_proc=wait_proc@entry=0x0, just_wait_proc=just_wait_proc@entry=0) at process.c:5531 #101 0x0100a69e in sit_for (timeout=make_number(22), reading=reading@entry=true, display_option=display_option@entry=1) at dispnew.c:5805 #102 0x010c6c8c in read_char (commandflag=, commandflag@entry=1, map=, prev_event=, used_mouse_menu=, used_mouse_menu@entry=0x88f743, end_time=, end_time@entry=0x0) at keyboard.c:2723 #103 0x010c8303 in read_key_sequence (keybuf=keybuf@entry=0x88f850, prompt=, dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, bufsize=30) at keyboard.c:9157 #104 0x010ca3e4 in command_loop_1 () at keyboard.c:1368 #105 0x011415d2 in internal_condition_case ( bfun=bfun@entry=0x10ca155 , handlers=XIL(0x4e90), hfun=hfun@entry=0x10bf040 ) at eval.c:1336 #106 0x010b82a3 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1110 #107 0x01141574 in internal_catch (tag=XIL(0xd290), func=func@entry=0x10b827c , arg=XIL(0)) at eval.c:1101 #108 0x010b824b in command_loop () at keyboard.c:1089 #109 0x010bec14 in recursive_edit_1 () at keyboard.c:695 #110 0x010bef02 in Frecursive_edit () at keyboard.c:766 #111 0x01233073 in main (argc=, argv=) at emacs.c:1722 Lisp Backtrace: "1+" (0x88acd0) "goto-char" (0x88adb8) "save-excursion" (0x88aee8) "cond" (0x88aff8) "setq" (0x88b138) "let" (0x88b2b8) "if" (0x88b3d8) "catch" (0x88b548) "while" (0x88b668) "if" (0x88b788) "save-restriction" (0x88b8b8) "let" (0x88baf8) "c-beginning-of-statement-1" (0x88bbf0) "setq" (0x88be48) "eq" (0x88bf38) "not" (0x88c028) "and" (0x88c138) "while" (0x88c258) "let" (0x88c3d8) "let*" (0x88c528) "catch" (0x88c698) "c-beginning-of-decl-1" (0x88c810) 0xadfab48 PVEC_COMPILED "font-lock-fontify-keywords-region" (0x88d0c0) "font-lock-default-fontify-region" (0x88d410) "c-font-lock-fontify-region" (0x88d740) "font-lock-fontify-region" (0x88d9e8) 0x18b47060 PVEC_COMPILED "run-hook-wrapped" (0x88de00) "jit-lock--run-functions" (0x88e150) "jit-lock-fontify-now" (0x88e5b0) "jit-lock-stealth-fontify" (0x88ea60) "apply" (0x88ea58) "timer-event-handler" (0x88eda8) This comes from the following code fragment: (defun c-beginning-of-statement-1 (&optional lim ignore-labels noerror comma-delim) [...] ;; Just gone back over some paren block? ((looking-at "\\s(") (save-excursion (goto-char (1+ (c-down-list-backward before-sws-pos))) (c-crosses-statement-barrier-p (point) maybe-after-boundary-pos))) c-down-list-backward is documented to be able to return nil, so passing the result to 1+ is unsafe. I cannot claim a good understanding of the code, but the following ad-hoc patch fixes the problem for me: --- lisp/progmodes/cc-engine.el~0 2019-01-07 16:26:06.000000000 +0200 +++ lisp/progmodes/cc-engine.el 2019-05-01 14:43:35.823456200 +0300 @@ -1130,10 +1130,12 @@ ;; Just gone back over some paren block? ((looking-at "\\s(") (save-excursion - (goto-char (1+ (c-down-list-backward - before-sws-pos))) - (c-crosses-statement-barrier-p - (point) maybe-after-boundary-pos))) + (let ((pos1 (c-down-list-backward + before-sws-pos))) + (when (number-or-marker-p pos1) + (goto-char (1+ pos1)) + (c-crosses-statement-barrier-p + (point) maybe-after-boundary-pos))))) ;; Just gone back over an ordinary symbol of some sort? (t (c-crosses-statement-barrier-p (point) maybe-after-boundary-pos)))) From debbugs-submit-bounces@debbugs.gnu.org Sat May 04 08:41:11 2019 Received: (at 28850) by debbugs.gnu.org; 4 May 2019 12:41:11 +0000 Received: from localhost ([127.0.0.1]:50533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMtyY-00029d-Ss for submit@debbugs.gnu.org; Sat, 04 May 2019 08:41:11 -0400 Received: from colin.muc.de ([193.149.48.1]:34897 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hMtyV-00029O-MX for 28850@debbugs.gnu.org; Sat, 04 May 2019 08:41:08 -0400 Received: (qmail 45693 invoked by uid 3782); 4 May 2019 12:41:04 -0000 Received: from acm.muc.de (p4FE150FB.dip0.t-ipconnect.de [79.225.80.251]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 04 May 2019 14:41:02 +0200 Received: (qmail 5494 invoked by uid 1000); 4 May 2019 12:41:02 -0000 Date: Sat, 4 May 2019 12:41:02 +0000 To: Eli Zaretskii Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190504124102.GB4139@ACM> References: <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <83h8afsee5.fsf@gnu.org> <83y33qovrw.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83y33qovrw.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: contovob@tcd.ie, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. Sorry it's taken me a little time to answer you. I was rather busy with another bug. On Wed, May 01, 2019 at 21:49:07 +0300, Eli Zaretskii wrote: > > Date: Tue, 30 Apr 2019 18:26:26 +0300 > > From: Eli Zaretskii > > Cc: acm@muc.de, 28850@debbugs.gnu.org > > > > FWIW, I think I see something similar in Emacs 26.2, I will try to > > catch it one of these days. > Done. The error messages are slightly different: wrong-type-argument > number-or-marker-p nil. > It was very hard to debug, but eventually I succeeded to catch a > backtrace: > Thread 1 hit Breakpoint 5, wrong_type_argument (predicate=XIL(0x9f90), > value=XIL(0)) at data.c:146 > 146 { > #0 wrong_type_argument (predicate=XIL(0x9f90), value=XIL(0)) at data.c:146 > #1 0x01127519 in CHECK_TYPE (x=XIL(0), predicate=, ok=0) > at lisp.h:625 [ .... ] > Lisp Backtrace: > "1+" (0x88acd0) > "goto-char" (0x88adb8) > "save-excursion" (0x88aee8) > "cond" (0x88aff8) > "setq" (0x88b138) > "let" (0x88b2b8) > "if" (0x88b3d8) > "catch" (0x88b548) > "while" (0x88b668) > "if" (0x88b788) > "save-restriction" (0x88b8b8) > "let" (0x88baf8) > "c-beginning-of-statement-1" (0x88bbf0) > "setq" (0x88be48) > "eq" (0x88bf38) > "not" (0x88c028) > "and" (0x88c138) > "while" (0x88c258) > "let" (0x88c3d8) > "let*" (0x88c528) > "catch" (0x88c698) > "c-beginning-of-decl-1" (0x88c810) > 0xadfab48 PVEC_COMPILED > "font-lock-fontify-keywords-region" (0x88d0c0) > "font-lock-default-fontify-region" (0x88d410) > "c-font-lock-fontify-region" (0x88d740) > "font-lock-fontify-region" (0x88d9e8) > 0x18b47060 PVEC_COMPILED > "run-hook-wrapped" (0x88de00) > "jit-lock--run-functions" (0x88e150) > "jit-lock-fontify-now" (0x88e5b0) > "jit-lock-stealth-fontify" (0x88ea60) > "apply" (0x88ea58) > "timer-event-handler" (0x88eda8) > This comes from the following code fragment: > (defun c-beginning-of-statement-1 (&optional lim ignore-labels > noerror comma-delim) > [...] > ;; Just gone back over some paren block? > ((looking-at "\\s(") > (save-excursion > (goto-char (1+ (c-down-list-backward > before-sws-pos))) > (c-crosses-statement-barrier-p > (point) maybe-after-boundary-pos))) > c-down-list-backward is documented to be able to return nil, so > passing the result to 1+ is unsafe. The movement function which brought point to that "\\s(" was c-backward-sexp, i.e. (goto-char (scan-sexps (point) -1)), so the nil that you got from c-down-list-backward "can't possibly happen". :-( > I cannot claim a good understanding of the code, .... Long ago, that function, before it was rewritten by Martin Stjernholm, carried the comment "if you think you understand this function you are probably mistaken." ;-). > .... but the following ad-hoc patch fixes the problem for me: > --- lisp/progmodes/cc-engine.el~0 2019-01-07 16:26:06.000000000 +0200 > +++ lisp/progmodes/cc-engine.el 2019-05-01 14:43:35.823456200 +0300 > @@ -1130,10 +1130,12 @@ > ;; Just gone back over some paren block? > ((looking-at "\\s(") > (save-excursion > - (goto-char (1+ (c-down-list-backward > - before-sws-pos))) > - (c-crosses-statement-barrier-p > - (point) maybe-after-boundary-pos))) > + (let ((pos1 (c-down-list-backward > + before-sws-pos))) > + (when (number-or-marker-p pos1) > + (goto-char (1+ pos1)) > + (c-crosses-statement-barrier-p > + (point) maybe-after-boundary-pos))))) > ;; Just gone back over an ordinary symbol of some sort? > (t (c-crosses-statement-barrier-p > (point) maybe-after-boundary-pos)))) However, that nil clearly did happen, so I'll be spending some time working out how it could have happened, and amending c-beginning-of-statement-1 accordingly, whether with your ad-hoc patch or otherwise. Thanks for taking so much time and trouble to get that stack trace. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat May 04 09:36:59 2019 Received: (at 28850) by debbugs.gnu.org; 4 May 2019 13:36:59 +0000 Received: from localhost ([127.0.0.1]:50596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMuqZ-0005fx-7o for submit@debbugs.gnu.org; Sat, 04 May 2019 09:36:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMuqX-0005fk-8o for 28850@debbugs.gnu.org; Sat, 04 May 2019 09:36:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMuqR-0006P2-GV; Sat, 04 May 2019 09:36:51 -0400 Received: from [176.228.60.248] (port=2475 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMuqQ-000157-Uy; Sat, 04 May 2019 09:36:51 -0400 Date: Sat, 04 May 2019 16:36:36 +0300 Message-Id: <83pnoyl4t7.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20190504124102.GB4139@ACM> (message from Alan Mackenzie on Sat, 4 May 2019 12:41:02 +0000) Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <83h8afsee5.fsf@gnu.org> <83y33qovrw.fsf@gnu.org> <20190504124102.GB4139@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28850 Cc: contovob@tcd.ie, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 4 May 2019 12:41:02 +0000 > Cc: contovob@tcd.ie, 28850@debbugs.gnu.org > From: Alan Mackenzie > > However, that nil clearly did happen, so I'll be spending some time > working out how it could have happened, and amending > c-beginning-of-statement-1 accordingly, whether with your ad-hoc patch > or otherwise. Thanks in advance. Looking forward to seeing the fix in Emacs near me. From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 05:06:28 2019 Received: (at 28850) by debbugs.gnu.org; 5 May 2019 09:06:28 +0000 Received: from localhost ([127.0.0.1]:52963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hND6J-0001sL-Nb for submit@debbugs.gnu.org; Sun, 05 May 2019 05:06:28 -0400 Received: from colin.muc.de ([193.149.48.1]:47491 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hND6H-0001s9-HI for 28850@debbugs.gnu.org; Sun, 05 May 2019 05:06:26 -0400 Received: (qmail 25029 invoked by uid 3782); 5 May 2019 09:06:23 -0000 Received: from acm.muc.de (p2E5D575B.dip0.t-ipconnect.de [46.93.87.91]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 05 May 2019 11:06:22 +0200 Received: (qmail 4520 invoked by uid 1000); 5 May 2019 09:06:22 -0000 Date: Sun, 5 May 2019 09:06:22 +0000 To: Eli Zaretskii Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190505090622.GA4193@ACM> References: <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <83h8afsee5.fsf@gnu.org> <83y33qovrw.fsf@gnu.org> <20190504124102.GB4139@ACM> <83pnoyl4t7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83pnoyl4t7.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: contovob@tcd.ie, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Sat, May 04, 2019 at 16:36:36 +0300, Eli Zaretskii wrote: > > Date: Sat, 4 May 2019 12:41:02 +0000 > > Cc: contovob@tcd.ie, 28850@debbugs.gnu.org > > From: Alan Mackenzie > > > > However, that nil clearly did happen, so I'll be spending some time > > working out how it could have happened, and amending > > c-beginning-of-statement-1 accordingly, whether with your ad-hoc patch > > or otherwise. > Thanks in advance. Looking forward to seeing the fix in Emacs near > me. I have a hypothesis and a patch. The code at this point in c-beginning-of-statement-1 is in a loop, where it goes back a sexp at a time, checking for end of statement after each going back. (Note, the most immediate `while' isn't this loop.) If that sexp was a paren block, the code checks for a statement boundary between just before the terminating paren and the starting point for the sexp movement. However, having gone back over this paren block, it would be a waste of time to step forward over it again, so the function notes the starting point in the variable before-sws-pos ("sws" = "syntactic whitespace"). This before-sws-pos is the argument to the c-down-list-backward which shouldn't return nil. This goes wrong if there's a macro between the sexp starting point and the closing paren. The c-down-list-backward then moves into the macro (if there's a paren there), and we have nonsense. That's the theory. The fix, which is now obvious, is to (setq before-sws-pos ...) after moving back over a macro. Perhaps I should check the result of c-down-list-backward too, but that's to be done after checking the current fix. I can't actually test this myself, so would you please try out the patch below in your test setup, and let me know whether it fixes this nasty bug. Thanks! diff -r 13a9cf53cd4d cc-engine.el --- a/cc-engine.el Thu May 02 20:41:32 2019 +0000 +++ b/cc-engine.el Sun May 05 08:40:14 2019 +0000 @@ -1148,6 +1148,9 @@ ;; Have we moved into a macro? ((and (not macro-start) (c-beginning-of-macro)) + (save-excursion + (c-backward-syntactic-ws) + (setq before-sws-pos (point))) ;; Have we crossed a statement boundary? If not, ;; keep going back until we find one or a "real" sexp. (and -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 11:35:59 2019 Received: (at 28850) by debbugs.gnu.org; 6 May 2019 15:35:59 +0000 Received: from localhost ([127.0.0.1]:57243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNfep-0001pD-2I for submit@debbugs.gnu.org; Mon, 06 May 2019 11:35:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNfem-0001ou-Ao for 28850@debbugs.gnu.org; Mon, 06 May 2019 11:35:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNfeg-0007RH-6i; Mon, 06 May 2019 11:35:50 -0400 Received: from [176.228.60.248] (port=2916 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hNfeb-0004Yy-IK; Mon, 06 May 2019 11:35:47 -0400 Date: Mon, 06 May 2019 18:35:28 +0300 Message-Id: <83h8a7k33z.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20190505090622.GA4193@ACM> (message from Alan Mackenzie on Sun, 5 May 2019 09:06:22 +0000) Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <83h8afsee5.fsf@gnu.org> <83y33qovrw.fsf@gnu.org> <20190504124102.GB4139@ACM> <83pnoyl4t7.fsf@gnu.org> <20190505090622.GA4193@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28850 Cc: contovob@tcd.ie, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 5 May 2019 09:06:22 +0000 > Cc: contovob@tcd.ie, 28850@debbugs.gnu.org > From: Alan Mackenzie > > That's the theory. The fix, which is now obvious, is to (setq > before-sws-pos ...) after moving back over a macro. Perhaps I should > check the result of c-down-list-backward too, but that's to be done > after checking the current fix. > > I can't actually test this myself, so would you please try out the patch > below in your test setup, and let me know whether it fixes this nasty > bug. With this patch, the problem is gone, so I guess you hit the nail on the head. Thanks. (In terms of testing, I think you can visit textprop.c, then turn on jit-lock-stealth, and let Emacs run for a while. Without the patch, you should see the error message pretty soon.) From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 14:10:52 2019 Received: (at 28850) by debbugs.gnu.org; 6 May 2019 18:10:53 +0000 Received: from localhost ([127.0.0.1]:57350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNi4i-0005tG-Io for submit@debbugs.gnu.org; Mon, 06 May 2019 14:10:52 -0400 Received: from colin.muc.de ([193.149.48.1]:16515 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hNi4g-0005t6-C0 for 28850@debbugs.gnu.org; Mon, 06 May 2019 14:10:51 -0400 Received: (qmail 93085 invoked by uid 3782); 6 May 2019 18:10:44 -0000 Received: from acm.muc.de (p4FE15DE3.dip0.t-ipconnect.de [79.225.93.227]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 06 May 2019 20:10:43 +0200 Received: (qmail 16397 invoked by uid 1000); 6 May 2019 18:10:43 -0000 Date: Mon, 6 May 2019 18:10:43 +0000 To: Eli Zaretskii Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190506181043.GA16338@ACM> References: <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <83h8afsee5.fsf@gnu.org> <83y33qovrw.fsf@gnu.org> <20190504124102.GB4139@ACM> <83pnoyl4t7.fsf@gnu.org> <20190505090622.GA4193@ACM> <83h8a7k33z.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83h8a7k33z.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: contovob@tcd.ie, 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Mon, May 06, 2019 at 18:35:28 +0300, Eli Zaretskii wrote: > > Date: Sun, 5 May 2019 09:06:22 +0000 > > Cc: contovob@tcd.ie, 28850@debbugs.gnu.org > > From: Alan Mackenzie > > That's the theory. The fix, which is now obvious, is to (setq > > before-sws-pos ...) after moving back over a macro. Perhaps I should > > check the result of c-down-list-backward too, but that's to be done > > after checking the current fix. > > I can't actually test this myself, so would you please try out the patch > > below in your test setup, and let me know whether it fixes this nasty > > bug. > With this patch, the problem is gone, so I guess you hit the nail on > the head. Thanks. Thank you! I've committed that patch. > (In terms of testing, I think you can visit textprop.c, then turn on > jit-lock-stealth, and let Emacs run for a while. Without the patch, > you should see the error message pretty soon.) Are you sure you mean textprop.c? With jit-lock-stealth-mode enabled, I couldn't get the error on textprop.c. That file only has seven CPP constructs, all right near the start of the buffer, and none of them seem to have the closing brace/bracket/parenthesis in the right place to trigger the error. Anyway, it's probably not that important. There was definitely a bug in CC Mode at that place in c-beginning-of-statement-1, and there was definitely a bug in CC Mode which threw an exception in your stealthy fontification. The patch appears to have fixed both. I'll close bug #28850 (again), seeing as how Basil C. has confirmed that "his" bug is fixed, too. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 14:44:27 2019 Received: (at 28850-done) by debbugs.gnu.org; 6 May 2019 18:44:27 +0000 Received: from localhost ([127.0.0.1]:57391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNibC-0006jf-PW for submit@debbugs.gnu.org; Mon, 06 May 2019 14:44:27 -0400 Received: from colin.muc.de ([193.149.48.1]:17160 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hNibA-0006jW-UL for 28850-done@debbugs.gnu.org; Mon, 06 May 2019 14:44:25 -0400 Received: (qmail 10814 invoked by uid 3782); 6 May 2019 18:44:21 -0000 Received: from acm.muc.de (p4FE15DE3.dip0.t-ipconnect.de [79.225.93.227]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 06 May 2019 20:44:19 +0200 Received: (qmail 16565 invoked by uid 1000); 6 May 2019 18:44:19 -0000 Date: Mon, 6 May 2019 18:44:19 +0000 To: "Basil L. Contovounesios" Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") Message-ID: <20190506184419.GB16338@ACM> References: <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <20190430133203.GC4142@ACM> <87wojb7glg.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wojb7glg.fsf@tcd.ie> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850-done Cc: Eli Zaretskii , 28850-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Basil. On Tue, Apr 30, 2019 at 14:44:27 +0100, Basil L. Contovounesios wrote: > Alan Mackenzie writes: [ .... ] > > I've just committed a patch to all the usual places (including the > > savannah master) which I'm confident will have fixed the bug. Feel free > > to test this (and tell me what isn't quite fixed ;-). > Thanks, I've had no problems so far. I definitely can't reproduce the > error in the OP any more, so you can close the report again as far as > I'm concerned. OK, that's great. The bug which Eli reported and investigated has been fixed, too, so I'm closing this bug report (again). > -- > Basil -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 20:35:55 2019 Received: (at 28850) by debbugs.gnu.org; 7 May 2019 00:35:55 +0000 Received: from localhost ([127.0.0.1]:57810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNo5I-00039D-PC for submit@debbugs.gnu.org; Mon, 06 May 2019 20:35:53 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:40014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNo5G-00038x-Hv for 28850@debbugs.gnu.org; Mon, 06 May 2019 20:35:51 -0400 Received: by mail-ed1-f65.google.com with SMTP id e56so17039059ede.7 for <28850@debbugs.gnu.org>; Mon, 06 May 2019 17:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RPSwe8YEJ8W+FjqprInQTWhVx92oc10sO+D+1Cp4m+I=; b=dBEJeHB20NK03Cyn1pXWWGTsa8mj6yiuUd9WIDwduAo29GPS7xEGpVVwjwj8L1f7DF eIXPkc6E8c68li1JGRm+GT+gCWrx4lJmnb+0Pqy04lS9aRL/kbLC6yQnjA9SIEeJuacq 5UGaCDG8GEkkPAVXLMCvGwxUbvUY3ZNQa4j97NnrxZSQwL282YIClSexemDtoLMcWFCn UCHWJzARIYhBiM7jgG1uHuE5FlC+kZp9UGjLHTQLRWYtyvfAbBfZrCAhesLAzzYfZZdU 9bmRnAIWywmI5PPHPaQnE8j3Gli96KBI+t5+H/0XBwcC1jfUHS8li2YyY77mDdb1h/yK L2Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=RPSwe8YEJ8W+FjqprInQTWhVx92oc10sO+D+1Cp4m+I=; b=gw1EfXzunN1SRI8fzRogoDmgCoW9/tz0Ow8iuVYp1tZhv2v+070HBcWRuNFbtuFqa3 lSOr0pTmasWHMPbWPT0busus4PLmHrbIxG8t4Yl2olSsijmWMLxsuRRF4Szx8U3kx6mw DtqminOeaXJLfUs4c59Pr/Kd9qGI9hpyUxNNK0So7ll02T1xkNx1m4bgln6mtG8Xxrd4 mQlP9FrO5n+1td7oQDZorb3i0Qb5wOSLW9c6/macFI8vnwE+c4EkGzswHVDEm//KKgEK FT2AVFZ8wgsXHpS3u8mymZlm9UKbe4b+a9DlESuraP5MKoQetDGYBWO2azQ/wNRORTe0 C3UQ== X-Gm-Message-State: APjAAAXw/IiJ/Eim6iwA0aokJuKT/1Lq7wTqfydUR6WOw5+VkAkY6fm6 zs4ejANQXcevWKjD8ldz3WO+pw== X-Google-Smtp-Source: APXvYqw6hpZAdELcnuHCivrggBGKDeuoOo6khYpLj9iPznG8RT/teLMi5LEPCcxy6j2z04X9rIFh2Q== X-Received: by 2002:a05:6402:1612:: with SMTP id f18mr29274352edv.295.1557189344662; Mon, 06 May 2019 17:35:44 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:6fa:38d6:1fce:ddb3]) by smtp.gmail.com with ESMTPSA id 65sm3536908edm.60.2019.05.06.17.35.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 06 May 2019 17:35:43 -0700 (PDT) From: "Basil L. Contovounesios" To: Alan Mackenzie Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)") References: <20171022201340.GA16074@ACM> <834lqoa9jj.fsf@gnu.org> <20171024203312.GA5875@ACM> <20171025191137.GA16060@ACM> <83wp3h7tar.fsf@gnu.org> <87o94oz210.fsf@tcd.ie> <20190430113302.GB4142@ACM> <8736lzirbn.fsf@tcd.ie> <20190430133203.GC4142@ACM> <87wojb7glg.fsf@tcd.ie> <20190506184419.GB16338@ACM> Date: Tue, 07 May 2019 01:35:35 +0100 In-Reply-To: <20190506184419.GB16338@ACM> (Alan Mackenzie's message of "Mon, 6 May 2019 18:44:19 +0000") Message-ID: <875zqn2jag.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28850 Cc: Eli Zaretskii , 28850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alan Mackenzie writes: > On Tue, Apr 30, 2019 at 14:44:27 +0100, Basil L. Contovounesios wrote: >> Alan Mackenzie writes: > > [ .... ] > >> > I've just committed a patch to all the usual places (including the >> > savannah master) which I'm confident will have fixed the bug. Feel free >> > to test this (and tell me what isn't quite fixed ;-). > >> Thanks, I've had no problems so far. I definitely can't reproduce the >> error in the OP any more, so you can close the report again as far as >> I'm concerned. > > OK, that's great. The bug which Eli reported and investigated has been > fixed, too, so I'm closing this bug report (again). Thanks again to both of ye! -- Basil From unknown Fri Jun 20 07:19:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Jun 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator