From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Miguel V. S. Frasson" Newsgroups: gmane.emacs.bugs Subject: bug#49066: 26.3; Segmentation fault on specific utf8 string Date: Wed, 16 Jun 2021 18:07:06 -0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17583"; mail-complaints-to="usenet@ciao.gmane.io" To: 49066@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 16 23:08:13 2021 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 1ltclh-0004Nc-42 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 23:08:13 +0200 Original-Received: from localhost ([::1]:47290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltclg-0002mm-53 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 17:08:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltclW-0002hI-MW for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 17:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltclW-0007TM-Ew for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 17:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ltclW-0004jO-9m for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 17:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Miguel V. S. Frasson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Jun 2021 21:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49066 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.162387766718162 (code B ref -1); Wed, 16 Jun 2021 21:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jun 2021 21:07:47 +0000 Original-Received: from localhost ([127.0.0.1]:53442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltclG-0004iq-CZ for submit@debbugs.gnu.org; Wed, 16 Jun 2021 17:07:46 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltclE-0004ih-2b for submit@debbugs.gnu.org; Wed, 16 Jun 2021 17:07:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltclC-0002KQ-Pb for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 17:07:43 -0400 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:34309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltcl6-00079N-8p for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 17:07:42 -0400 Original-Received: by mail-lj1-x22d.google.com with SMTP id a21so770725ljj.1 for ; Wed, 16 Jun 2021 14:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=7KS4ZzIvTTS1zM6jpO2eEJtD5ua1C7B0Fxz3guU+eO8=; b=GNCJw3akyq6U66twRvobiRI2p5ME5wmMfUeoWQvvM93mW+aobWp8wkLSovPCbDNoCf 2jcwuGyhWD34A3AI9abefYXLw4RuJotYIcJnBVuWEmi9x08vJrFPNFHIFAG1aL60SvN3 X9qPnuZlFC6o4qNcP8FXLbQzGvQD/KEAFCfoE26Jx/x5kfpQGR+gCmbYvnTXmXF3lns4 hfcTV33b7osboqPfhFzOt6yCPxiH3Ey5kK5O02cmlbb2jXfwe3Ks0y6mD27Z+p6VQ5n2 bMcUviLg25ybyFinl+abb//o/I5cWJzrkfjAqVRxBd4CK+v+pe8OqyWwBe7Q//BEsorC wCtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=7KS4ZzIvTTS1zM6jpO2eEJtD5ua1C7B0Fxz3guU+eO8=; b=ryceuCQDcPyqUXxnTXUuZi/EqH8t7kmmb2RAxgNU1VEnIKBtuPcKrwzdq53sD8ICWm BkE+pHD760/UzgQsVhs1QyUNTW/Bkjaf0zBkV1J9Rr7PgIj+HpEy7Yc323KWPEBmACiE UlMlA0csc+568g0ZjzHuO8GV6ILUhHEu7kbIrh1UODF6jejAbGkBG2D2J58xbcbRq8QY 2z070aA1a5VAE7zItZyXmbZMVDLTPgyzpf5ovIATKGCHvSuHVxXTCwENnLwvuENEkcDG Q7JdobXiVqW4SLbH6BQjcKXlKQQOubWv+sJKVi3ULy6hrfbYFE9ukPVJsxcRyTZ8L6gj xb8A== X-Gm-Message-State: AOAM53063nYbQuAzHGy7SbdE6MJSwWy9+z4Sw43MKT/vVQHKPbfEDQP1 ecUN42EkOD6YVXIuSyKPpQjSNuGtrfcHHkwT72oIKbl+uC9O8Q== X-Google-Smtp-Source: ABdhPJwcZvtf2A7W3kmoj8mgAPjprGQVeW/mvBefVfg0EPbfrIc9qOrCO3NDzed4hQA8mTnSq/ogMVussKSbB7Yd68Q= X-Received: by 2002:a2e:8e74:: with SMTP id t20mr1494618ljk.397.1623877652888; Wed, 16 Jun 2021 14:07:32 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=mvsfrasson@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:208646 Archived-At: Dear Emacs developers I was editting a "comma-separated values" csv file for a geographic map creation, tried simple edition commands that now I see that wer irrelevant to bug reprodution. I managed to isolate the problem. It seams that my version of emacs with gui is unable to display a specific UTF8 line of a file possibly with mixing of text LTR and RTL and crashes. To help debug, I read /usr/share/emacs/26.3/etc/DEBUG, downloaded Emacs sources from 2 places, builded to see if I can reproduce that. I tried these versions: * from Ubuntu package GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.13) of 2019-12-24 -> emacs -Q foo -> always crash (I did it more tahn 20 times) same emacs, no gui -> emacs -nw -Q foo -> no crash * git GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu) of 2021-06-16 without toolkits and images --> no crash (1h30 of compilation time discoraged me to try to recompile) * 26.3 compiled from source download from http://ftpmirror.gnu.org/emacs/ - without toolkits -> no crash - with gtk3 -> no crash So I got stuck with my usual emacs without debug symbols and gtk ... How to reproduce: 1) Since just displaying the line crashes my Emacs I like to avoid display it below. So please download the 641 bytes file "foo" from wget https://sites.icmc.usp.br/frasson/foo Its content is just 1 line of UTF8 text with the name of Saint Pierre and Miquelon Islands in several languages. You can obtain it also decoding the following base64 output with "base64 -d= ": UTM0NjE3LNiz2KfZhiDYqNmK2YrYsSDZiNmF2YrZg9mE2YjZhizgprjgpr7gpoEg4Kaq4Ka/4Ka= v 4Ka84KeH4KawIOCmkyDgpq7gpr/gppXigIzgprLgp4vgpoEsU2FpbnQtUGllcnJlIHVuZCBNaXF= 1 ZWxvbixTYWludCBQaWVycmUgYW5kIE1pcXVlbG9uLFNhbiBQZWRybyB5IE1pcXVlbMOzbixTYWl= u dC1QaWVycmUtZXQtTWlxdWVsb24szqPOsc65zr0gzqDOuc61z4EgzrrOsc65IM6czrnOus61zrv= P jM69LOCkuOCkvuCkgS3gpKrgpY3gpK/gpYfgpLAg4KSU4KSwIOCkruClgOCkleClh+CksuCli+C= k gixTYWludC1QaWVycmUgw6lzIE1pcXVlbG9uLFNhaW50IFBpZXJyZSBkYW4gTWlxdWVsb24sU2F= p bnQtUGllcnJlIGUgTWlxdWVsb24s44K144Oz44OU44Ko44O844Or5bO244O744Of44Kv44Ot44O= z 5bO2LOyDne2UvOyXkOultCDrr7jtgbTrobEsU2FpbnQtUGllcnJlIGVuIE1pcXVlbG9uLFNhaW5= 0 LVBpZXJyZSBpIE1pcXVlbG9uLFNhaW50LVBpZXJyZSBlIE1pcXVlbG9uLNCh0LXQvS3Qn9GM0LX= R gCDQuCDQnNC40LrQtdC70L7QvSxTYWludC1QaWVycmUgb2NoIE1pcXVlbG9uLFNhaW50IFBpZXJ= y ZSB2ZSBNaXF1ZWxvbixTYWludC1QaWVycmUgdsOgIE1pcXVlbG9uLOWco+earuWfg+WwlOWSjOW= v huWFi+mahue+pOWymwo=3D 2) emacs -nw -Q foo Ok, exit Emacs, no crash. 3) emacs -Q foo Emacs crashes :-X 4) I see that with "emacs -nw -Q foo", if I delete the initial Q (or maybe a character that resembles Q), text direction changes abruptly, display/navigation gets crasy, just navigating with left and right arrow keys, we jump from first line to last, some up and down keys jumps a lot. This happens even with trunk git emacs that I compiled. If you like to see this, I recorded a screencast (2.63Mb): wget https://sites.icmc.usp.br/frasson/emacs-navigation.mp4 >From command line I get the following output: Fatal error 11: Segmentation fault Backtrace: emacs[0x51ab42] emacs[0x500211] emacs[0x518f14] emacs[0x51914d] emacs[0x5191cd] /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f7fca29b3c0] emacs[0x5ebe9b] emacs[0x5ef70d] emacs[0x58a752] emacs[0x57913c] emacs[0x5b8174] emacs[0x57bb61] emacs[0x5790bb] emacs[0x5783fa] emacs[0x4369ac] emacs[0x443276] emacs[0x5d9aa8] emacs[0x5ddbe0] emacs[0x44f664] emacs[0x44d695] emacs[0x4556f8] emacs[0x45a843] emacs[0x46f0c3] emacs[0x472183] emacs[0x57829e] emacs[0x43a016] emacs[0x45e079] emacs[0x50a447] emacs[0x50dad0] emacs[0x50f1e4] emacs[0x578206] emacs[0x5005d4] emacs[0x578175] emacs[0x500573] emacs[0x5057b7] emacs[0x505b18] emacs[0x4206d2] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f7fc9f870b3] emacs[0x4213de] Falha de segmenta=C3=A7=C3=A3o Best regards Miguel In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.13) of 2019-12-24 built on lcy01-amd64-029 Windowing system distributor 'The X.Org Foundation', version 11.0.12009000 System Description: Ubuntu 20.04.2 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. saida-raw50.csv has auto save data; consider M-x recover-this-file Mark set Type y, n, ! or SPC (the space bar): Defining kbd macro... Mark set [2 times] Replaced 169 occurrences Keyboard macro defined Configured using: 'configure --build=3Dx86_64-linux-gnu --prefix=3D/usr '--includedir=3D${prefix}/include' '--mandir=3D${prefix}/share/man' '--infodir=3D${prefix}/share/info' --sysconfdir=3D/etc --localstatedir=3D/= var --disable-silent-rules '--libdir=3D${prefix}/lib/x86_64-linux-gnu' '--libexecdir=3D${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=3D/usr --sharedstatedir=3D/var/lib --program-suffix=3D26 --with-modules --with-file-notification=3Dinotify --with-mailutils --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-xwidgets --with-lcms2 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs26-XQGPla/emacs26-26.3~1.git96dd019=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security -no-pie' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' 'LDFLAGS=3D-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD LCMS2 Important settings: value of $LANG: pt_BR.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-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 dired dired-loaddefs format-spec rfc822 mml 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 macros misearch multi-isearch kmacro cl-extra help-mode easymenu cl-loaddefs cl-lib novice elec-pair time-date mule-util 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 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 99690 8444) (symbols 48 20739 1) (miscs 40 284 240) (strings 32 29677 1323) (string-bytes 1 787981) (vectors 16 15049) (vector-slots 8 550898 10514) (floats 8 51 224) (intervals 56 261 0) (buffers 992 13)) --=20 Miguel Vinicius Santini Frasson mvsfrasson@gmail.com