From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simon Pugnet Newsgroups: gmane.emacs.bugs Subject: bug#43589: 27.1.50; Crash in Org mode buffer when moving point after using outline-hide-other when visual-line-mode and visual line numbers are enabled Date: Thu, 24 Sep 2020 13:51:54 +0100 Message-ID: <878scz2v85.fsf@polaris64.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12402"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.2.0; emacs 27.1.50 To: 43589@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 24 14:53:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLQkI-00038I-KD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Sep 2020 14:53:10 +0200 Original-Received: from localhost ([::1]:45518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLQkH-00049s-N5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Sep 2020 08:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLQkA-00049i-AN for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 08:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLQkA-0007S1-0J for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 08:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kLQk9-0007ZS-Vr for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 08:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simon Pugnet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Sep 2020 12:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43589 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160095193229046 (code B ref -1); Thu, 24 Sep 2020 12:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2020 12:52:12 +0000 Original-Received: from localhost ([127.0.0.1]:38899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLQjL-0007YP-E7 for submit@debbugs.gnu.org; Thu, 24 Sep 2020 08:52:11 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:39980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLQjI-0007YH-R9 for submit@debbugs.gnu.org; Thu, 24 Sep 2020 08:52:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLQjH-00041u-5h for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 08:52:08 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:36110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLQjF-0007O3-4r for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 08:52:06 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id z1so3704974wrt.3 for ; Thu, 24 Sep 2020 05:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:user-agent:from:to:subject:date:message-id:mime-version; bh=+UkjCLdfUpm6CbRStGB8d7BBgx92OuDMErJBD+1uKpU=; b=m5PxkDL0yfWxcDAwu9HD71P8fE+71b5adRM0Hp+WA509mJxWbKCaPPHd6935n+8p23 YnHZGyHYPo1QdDu8hwSrzbGKYz5cVbTc1MZ6hn2/1XH5TlyUo8OwfxceKjMQkMZcBnWi a3xBP/EoWiWN/V7kZIwOmYg2b8De0wZGoZ2fJBxVGdK3OkF2sJ7MqZ9etnM0zf9D3gU0 9T205pES/lYawki9X2NFE/9vNJ+9rL995GvuHNG9piyEaxwX70kFajBG4QRoNcLnjkPe f0TpLH/QStC7B1qBq+DtwtrUoJuJx9+Jj/Uuxdfe9uRnSWni6a5wuaq2Zqf3ohbP2aYg vC/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:user-agent:from:to:subject:date :message-id:mime-version; bh=+UkjCLdfUpm6CbRStGB8d7BBgx92OuDMErJBD+1uKpU=; b=V5VAJS/9pfRC2/tqrQ072gBKFcQle39UayFhwu2/5wQ4Jf3Wz6q/U9EPCHKVHLU754 Qfgd/7G9WDWBjzdHGpbpvyuWBTNUKjgeny06ZfGrhKedYlphF+04BC53NkzkM4QrLX0a VXbjNX9TFqO5Z3A60VlAZwWf7VZFsyuwLjwKyy9EwM6pe9mZvHIImurdYpLvjJyH/pKm MCwnr4oWp0ltihpJbNoC+JJlnTfHkAOzenfYwBGawUCpHj7C8rjr0Bt4WRRPZLP7c27j Y7ZajdJt/y0oXenulXwHS0jdk4b9z6C8dX5USxgypSBZx6DVcHQTVF4jetfGxF/AwGk4 gJwA== X-Gm-Message-State: AOAM5307LMkJXBkAHbVlG8nuJSyHUjR1jYryXf7wB6t25eIy5BFdEgsA 2NVJju4192JIhVeB7u5Q3fyw3R3vnGGFfQ== X-Google-Smtp-Source: ABdhPJwi+rOiqPgigDcRwkCYpJfTbV5dj/A0VCcFr1dSYR8RE6Vqy9rKpFYKpMte0Ga4OJN5WOaebg== X-Received: by 2002:adf:dd0b:: with SMTP id a11mr4840134wrm.422.1600951922608; Thu, 24 Sep 2020 05:52:02 -0700 (PDT) Original-Received: from karnak (13-132.dsl.iskon.hr. [89.164.13.132]) by smtp.gmail.com with ESMTPSA id u8sm3205002wmj.45.2020.09.24.05.52.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 05:52:01 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=simon.pugnet@gmail.com; helo=mail-wr1-x434.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188849 Archived-At: --=-=-= Content-Type: text/plain; format=flowed Emacs can be made to crash with a segmentation fault on Linux when navigating an Org mode buffer after hiding headlines with ~outline-hide-other~. This only happens when ~visual-line-mode~ and ~display-line-numbers-mode~ are active and ~display-line-numbers-type~ is set to ~'visual~. This bug can be replicated on a build from the current HEAD of emacs-27 (395f10cb98af122404bcdc2eb60d30decf297625) as well as the current HEAD of master (de54cd6f0edb3619777c17fe75560c5c84fed8a4). This bug report was produced from a version compiled from 395f10cb98af122404bcdc2eb60d30decf297625. Steps to reproduce: - 1. Launch ~emacs -Q~ 2. Enable "visual" line numbers (~(setq display-line-numbers-type 'visual)~) 3. Create an Org mode buffer with the following content: - * Heading 1 ** Heading 1a ** Heading 1b 4. Enable ~display-line-numbers-mode~ 5. Enable ~visual-line-mode~ 6. Move the point anywhere on the line with "Heading 1b" 7. Call ~outline-hide-other~ 8. Call ~previous-line~ (via keybinding or directly) Emacs then crashes with SIGSEGV. Debugging emacs in GDB while doing this seems to show a loop as follows: - Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. 0x00005555555d1b39 in move_it_in_display_line_to (it=it@entry=0x7fffff6734e0, to_charpos=to_charpos@entry=171, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:9009 9009 { (gdb) bt #0 0x00005555555d1b39 in move_it_in_display_line_to (it=it@entry=0x7fffff6734e0, to_charpos=to_charpos@entry=171, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:9009 #1 0x00005555555d6bbd in move_it_to (it=0x7fffff6734e0, to_charpos=171, to_x=, to_y=, to_vpos=, op=8) at xdisp.c:9889 #2 0x00005555555d0e92 in start_display (it=it@entry=0x7fffff6734e0, w=0x555555eeffa0, pos=...) at xdisp.c:6866 #3 0x00005555555d1a50 in display_count_lines_visually (it=0x7fffff67bc70) at xdisp.c:22685 #4 maybe_produce_line_number (it=it@entry=0x7fffff67bc70) at xdisp.c:22729 #5 0x00005555555d2e11 in move_it_in_display_line_to (it=it@entry=0x7fffff67bc70, to_charpos=to_charpos@entry=171, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:9079 #6 0x00005555555d6bbd in move_it_to (it=0x7fffff67bc70, to_charpos=171, to_x=, to_y=, to_vpos=, op=8) at xdisp.c:9889 #7 0x00005555555d0e92 in start_display (it=it@entry=0x7fffff67bc70, w=0x555555eeffa0, pos=...) at xdisp.c:6866 #8 0x00005555555d1a50 in display_count_lines_visually (it=0x7fffff684400) at xdisp.c:22685 #9 maybe_produce_line_number (it=it@entry=0x7fffff684400) at xdisp.c:22729 (... sequence repeats ...) #1439 maybe_produce_line_number (it=it@entry=0x7fffffffb6a0) at xdisp.c:22729 #1440 0x00005555555d2e11 in move_it_in_display_line_to (it=it@entry=0x7fffffffb6a0, to_charpos=to_charpos@entry=171, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:9079 #1441 0x00005555555d6bbd in move_it_to (it=0x7fffffffb6a0, to_charpos=171, to_x=, to_y=, to_vpos=, op=8) at xdisp.c:9889 #1442 0x00005555555d0e92 in start_display (it=it@entry=0x7fffffffb6a0, w=w@entry=0x555555eeffa0, pos=...) at xdisp.c:6866 #1443 0x00005555555d7af4 in Fline_pixel_height () at xdisp.c:1422 #1444 0x00005555556fdae3 in Ffuncall (nargs=1, args=args@entry=0x7fffffffca70) at lisp.h:2110 #1445 0x00005555557342cc in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:633 #1446 0x00005555556fda47 in Ffuncall (nargs=5, args=args@entry=0x7fffffffce48) at eval.c:2809 #1447 0x00005555557342cc in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:633 #1448 0x00005555556fda47 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x7fffffffd208) at eval.c:2809 #1449 0x00005555556fa295 in Ffuncall_interactively (nargs=3, args=0x7fffffffd208) at callint.c:254 #1450 0x00005555556fdae3 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x7fffffffd200) at lisp.h:2110 #1451 0x00005555556fb676 in Fcall_interactively (function=, record_flag=, keys=) at callint.c:783 #1452 0x00005555556fdae3 in Ffuncall (nargs=4, args=args@entry=0x7fffffffd438) at lisp.h:2110 #1453 0x00005555557342cc in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:633 #1454 0x00005555556fda47 in Ffuncall (nargs=2, args=0x7fffffffd7e0) at eval.c:2809 #1455 0x00005555556fdbce in call1 (fn=fn@entry=0x4380, arg1=) at eval.c:2655 #1456 0x00005555556937e8 in command_loop_1 () at lisp.h:1033 #1457 0x00005555556fcd17 in internal_condition_case (bfun=bfun@entry=0x5555556933f0 , handlers=handlers@entry=0x90, hfun=hfun@entry=0x55555568a0f0 ) at eval.c:1356 #1458 0x0000555555684bb4 in command_loop_2 (ignore=ignore@entry=0x0) at lisp.h:1033 #1459 0x00005555556fcc59 in internal_catch (tag=tag@entry=0xd5c0, func=func@entry=0x555555684b90 , arg=arg@entry=0x0) at eval.c:1117 #1460 0x0000555555684b53 in command_loop () at lisp.h:1033 #1461 0x0000555555689cfa in recursive_edit_1 () at keyboard.c:714 #1462 0x000055555568a036 in Frecursive_edit () at keyboard.c:786 #1463 0x00005555555a69b7 in main (argc=2, argv=) at emacs.c:2066 In GNU Emacs 27.1.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-24 built on karnak Repository revision: 395f10cb98af122404bcdc2eb60d30decf297625 Repository branch: emacs-27 Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Ubuntu 20.04.1 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Configured using: 'configure --with-cairo --with-mailutils --with-xwidgets --with-json' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LC_CTYPE: en_GB.UTF-8 value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix 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 dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 45107 8742) (symbols 48 6009 1) (strings 32 15461 1341) (string-bytes 1 507002) (vectors 16 10094) (vector-slots 8 130013 7762) (floats 8 20 43) (intervals 56 236 0) (buffers 1000 12)) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCAAyFiEEO/eF3hYsAMj7Tab9uhNZqCwLPvkFAl9slmoUHHNpbW9uQHBv bGFyaXM2NC5uZXQACgkQuhNZqCwLPvlDnQ/+PWB8V5D9OYWK0GH0r56j+QTV23ZY mJo+0MnSYO8Kpf0mp/1IoS51eJl44OrqfN4o+kJN5TmpbBMBypy0/aCFuVBaQYH+ u/38ARMqfUPuoQNO6pk2ZITvpabmwV5rjRJs3/ZRffR6+LNCD55HMOyMv2ghfefW wq2n07b0xEnbruIaPQxxlnd/oVAFWFIWGPtTK7Ilw+6DHO01wMM/vc2i9bqyf0dd lZUauEFUJG1ZoiRG/tfURkaUSMUEYoKhrzsb4+wL3kztYdWRAkAvZxV282Ljcd8C yb/0V0Y++bbT3asSvNNcN1JZ0HsBwE7d7RK+C4QaMlXKq4MAd2O8oPUPJc0K8pUZ CILGrdfYTSCrKnu+mPkyhh9nYolgZV6Zif39LI9mosRLUj4xJtYHUgXxymrYE9U+ bEbnYXPl9gqKvFT7ws0b2xDzpA4qBeo0msf4Db57NyHMn9i/duiSELoP636jIetF INm5tv81unltDQavsJUm/czmbkuXMY6qKxELvZoKaRefwCjCIr/lwe/hm6noXuu+ PctPBypBvddZer6jKzOxGR07Cg92ZIl7Vds+KC4h1OLkYEsUQ82STy0b3LAVX7sj JNoeCXp7R46FJ6KgC0uDihouzZ3GnXextdvO2jeEsLehAm308J3hFSlXQMCcAJhc RjsiSCWuSHGpYTE= =+1lC -----END PGP SIGNATURE----- --=-=-=--