From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59703: 29.0.50; Emacs crashes when turning treesit-explore-mode on with some C++ code Date: Wed, 30 Nov 2022 00:06:03 +0100 Message-ID: References: Reply-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37688"; mail-complaints-to="usenet@ciao.gmane.io" To: 59703@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 30 00:07:22 2022 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 1p09hB-0009Yz-JX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 00:07:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p09gv-0001l5-OT; Tue, 29 Nov 2022 18:07:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p09gt-0001iz-FN for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 18:07:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p09gt-0003zu-3x for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 18:07:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p09gs-00028O-En for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 18:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 23:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59703 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.16697631828183 (code B ref -1); Tue, 29 Nov 2022 23:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 23:06:22 +0000 Original-Received: from localhost ([127.0.0.1]:57037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p09gE-00027u-5J for submit@debbugs.gnu.org; Tue, 29 Nov 2022 18:06:22 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:47234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p09gA-00027o-EG for submit@debbugs.gnu.org; Tue, 29 Nov 2022 18:06:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p09g9-0001E6-5Y for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 18:06:18 -0500 Original-Received: from sonic304-23.consmr.mail.ir2.yahoo.com ([77.238.179.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p09g5-0003l1-4P for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 18:06:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1669763169; bh=cw3OHRvcpdo64po033uuaB03xTX3+cWqv+IY98SURro=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=OAcXZ5myRugC7yji9PxA59CfJnwKS90Rm8iSRb//9HJ4ejQ37HGj/IMWLfaETzAnyPes2Rc+PdKXh5DS42aXEHs8KUnCNzYaaMTpWp5exnj3hg0JnGYyfgpQibEdiC2D6SvL8dQsyeBG6cnaerJ3H1deObbajo6nCTBLFmxFw5VaKrm6x1wZ8HCbCsR7t3Rx+6iv1JM1Xgwn0bfbeiMbnGS5p7gl6CUJYU9EvQrg047/bxNzz5scWu5xZtFs6nTokWz93ChlUDTZ3LZX/0qkXSd/mWmmtfRNMh1cTctA/SsORs5CBdztH/adVx6J2aXW3HMedgbTVLQr6KV3RhRutQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1669763169; bh=igNw8x61C4ND5D3+QGzJ1Bb4G1Vu3u21oCOw5LFVgbA=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=YOYAmRof29dhw3RuoGfxsGRGRD1f/kl3p69Efd1lIz+a6b3DuaKYGF2flDoTtMrQA49y3Vryh7/gZTpG9VnX3xz/KyAeNyzBsRg/dYYtOaYz4mjkcB1fDdcwyVDrrUOYiTHYNucYW92PwcNZ+puzFMy17AIa3puQTsDSj9YTTFCJD34dsR3MwULoMvjjF//coZfI/lgiZ4NDnx6t9mLJJtRuESjS9Zo/PSXuBDsUhfZn9z53DK16e4p7ug9eO5s7K/hjGG3uZ5gu10JQoWm1PKjh8j95Z31d4bcsY14nGgQ5ifXmTHCK2l3j+qwVBCj75uTJzkNrdzqb/0wjKqpZBQ== X-YMail-OSG: 8NDlYXcVM1m5UqAb3Vu5.gAoF7g7lfOQLH_xKbPsK1zL0TtjQyWozU8CugFLwar hEs6tSbNH.WbcWjByV03fNvLsNYUJCUMZq_cGeDu2ziim5vLBBBoSotMQOoHbRLx9uOacErgN74P eE_lZP4g.S_H8tqavuVeAzEgwF7FZqKp_r4B4sMBvZML_u2Fwu57Sz1pnl88fsOH0Re07MBqnI37 lYEm83ym92pd7Iezns4lRSQ5jMjoPfuW6NTmuAD45tVl45CH7CYxeXAk3IAX4i5M6b4y1mkpBxYQ IUdAlTMmE7QVaG5Mp1VrkueUvpKiZ4f1VlJZiafPD5qFRqZl0XEXNaJsHKzMQcGaeinV7zWR.2rx 1lHRce6ZnYIQtvAp6H.8eKciXvo3OmN3xeBvHxDgdUM600vfmowXoRw9DcLtzIwUYtNrGqn5CNke KNJsXyC3AvleQKtVCWabupOBJwHNGkenqxHUGC9M4NTz7ObDZuSBcABiEEV3P_zKlqcfIDei6Pyq o3hJxdwnkEfdTAjzuwdqsgQfQcVKztC5BVR9w03teqqf1yTYM8cMMNj170kwIDF05hggpeFwMXUJ _MDqEReo7HjifYGpWlOtUKvhg02UIqK.MtinhGvI8F1YrgKOEb18GF6SZTKNcZ3XBF7UKwyjPyqN MXlZGC70eS5ICsMbrRc9xNSrvZRerCiWZ1PNqpr.wgRMpq2FVMk_E0y8TgDIPp.wcuD7ZEOtShLy nWtvJ4wrBDnfjQnRPVTh4rWyDhQNlh2D7LZ3wZ_8q.jiKfJsIzGZntFFqKP67Dckz2qqIBKO6DhK oOiVbRMnDjE7o0kHmq6.NoURo318Vtn9Ydsqdsl0zk X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Tue, 29 Nov 2022 23:06:09 +0000 Original-Received: by hermes--production-ir2-74cf6dc4df-524cn (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9bfcbd390ef68cadbdf75bad05d97c88; Tue, 29 Nov 2022 23:06:04 +0000 (UTC) X-Mailer: WebService/1.1.20863 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=77.238.179.148; envelope-from=mardani29@yahoo.es; helo=sonic304-23.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249452 Archived-At: Steps to reproduce the problem: emacs -Q C-x b sample.cpp RET Paste the following code: class OFFICE_EXPORT Sample : public Base, public WeakObservable { public: void getFoo(); private: mutable std::weak_ptr m_Foo; }; M-x c++-ts-mode RET M-x treesit-explore-mode RET M-< Emacs crashes with the following backtrace: * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100100005530847) * frame #0: 0x0000000101365fc8 libtree-sitter.0.dylib`ts_node_field_name_for_child + 24 frame #1: 0x00000001003b0a8c emacs`Ftreesit_node_field_name_for_child(node=0x00000001059f7575, n=(EMACS_INT) $329 = 0) at treesit.c:1868:7 frame #2: 0x00000001002c2cd4 emacs`funcall_subr(subr=0x00000001005028c8, numargs=2, args=(struct Lisp_Symbol *) $332 = 0x0000000100b32ec0) at eval.c:3036:15 frame #3: 0x000000010033bde4 emacs`exec_byte_code(fun=(struct Lisp_Vector *) $337 = 0x0000000103872e98, args_template=513, nargs=1, args=(struct Lisp_Symbol *) $340 = 0x0000000100b32ec0) at bytecode.c:809:14 frame #4: 0x00000001002c8054 emacs`fetch_and_exec_byte_code(fun=(struct Lisp_Vector *) $345 = 0x0000000135009550, args_template=0, nargs=0, args=(struct Lisp_Symbol *) $348 = 0x0000000100b32ec0) at eval.c:3081:10 frame #5: 0x00000001002c3300 emacs`funcall_lambda(fun=(struct Lisp_Vector *) $353 = 0x0000000135009550, nargs=0, arg_vector=(struct Lisp_Symbol *) $356 = 0x0000000100b32ec0) at eval.c:3153:9 frame #6: 0x00000001002c2914 emacs`funcall_general(fun=(struct Lisp_Vector *) $361 = 0x0000000135009550, numargs=0, args=(struct Lisp_Symbol *) $364 = 0x0000000100b32ec0) at eval.c:2945:12 frame #7: 0x00000001002bc8e0 emacs`Ffuncall(nargs=1, args=(struct Lisp_Symbol *) $367 = 0x0000000100b32ec0) at eval.c:2995:21 frame #8: 0x00000001002c1224 emacs`Fapply(nargs=2, args=(struct Lisp_Symbol *) $370 = 0x0000000100b32ec0) at eval.c:2619:12 frame #9: 0x00000001002c2e9c emacs`funcall_subr(subr=0x00000001004fca48, numargs=2, args=(struct Lisp_Symbol *) $373 = 0x0000000100b32ec0) at eval.c:3059:9 frame #10: 0x000000010033bde4 emacs`exec_byte_code(fun=(struct Lisp_Vector *) $378 = 0x00000001044e6b58, args_template=257, nargs=1, args=(struct Lisp_Symbol *) $381 = 0x0000000100b32ec0) at bytecode.c:809:14 frame #11: 0x00000001002c8054 emacs`fetch_and_exec_byte_code(fun=(struct Lisp_Vector *) $386 = 0x0000000104ae6e70, args_template=257, nargs=1, args=(struct Lisp_Symbol *) $389 = 0x0000000100b32ec0) at eval.c:3081:10 frame #12: 0x00000001002c3300 emacs`funcall_lambda(fun=(struct Lisp_Vector *) $394 = 0x0000000104ae6e70, nargs=1, arg_vector=(struct Lisp_Symbol *) $397 = 0x0000000100b32ec0) at eval.c:3153:9 frame #13: 0x00000001002c2914 emacs`funcall_general(fun=(struct Lisp_Vector *) $402 = 0x0000000104ae6e70, numargs=1, args=(struct Lisp_Symbol *) $405 = 0x0000000100b32ec0) at eval.c:2945:12 frame #14: 0x00000001002bc8e0 emacs`Ffuncall(nargs=2, args=(struct Lisp_Symbol *) $408 = 0x0000000100b32ec0) at eval.c:2995:21 frame #15: 0x00000001001a6da0 emacs`call1(fn=(struct Lisp_Symbol *) $411 = 0x0000000100b41f20, arg1=(struct Lisp_Vector *) $415 = 0x000000013500bc20) at lisp.h:3247:10 frame #16: 0x00000001001b058c emacs`timer_check_2(timers=(struct Lisp_Cons *) $417 = 0x0000000105972560, idle_timers=(struct Lisp_Cons *) $419 = 0x0000000105972570) at keyboard.c:4681:8 frame #17: 0x00000001001afc58 emacs`timer_check at keyboard.c:4747:18 frame #18: 0x00000001001ac6b4 emacs`readable_events(flags=1) at keyboard.c:3524:5 frame #19: 0x00000001001afae4 emacs`get_input_pending(flags=1) at keyboard.c:7367:42 frame #20: 0x00000001001aac68 emacs`detect_input_pending_run_timers(do_display=true) at keyboard.c:10897:5 frame #21: 0x0000000100350bec emacs`wait_reading_process_output(time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=(struct Lisp_Symbol *) $422 = 0x0000000100b32ec0, wait_proc=0x0000000000000000, just_wait_proc=0) at process.c:5779:8 frame #22: 0x000000010000c54c emacs`sit_for(timeout=(EMACS_INT) $424 = 30, reading=true, display_option=1) at dispnew.c:6252:7 frame #23: 0x00000001001a8a74 emacs`read_char(commandflag=1, map=(struct Lisp_Cons *) $426 = 0x000000010595beb0, prev_event=(struct Lisp_Symbol *) $429 = 0x0000000100b32ec0, used_mouse_menu=0x000000016fdfe837, end_time=0x0000000000000000) at keyboard.c:2872:11 frame #24: 0x00000001001a3a6c emacs`read_key_sequence(keybuf=(struct Lisp_Symbol *) $432 = 0x0000000100b32ec0, prompt=(struct Lisp_Symbol *) $435 = 0x0000000100b32ec0, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10074:12 frame #25: 0x00000001001a1d84 emacs`command_loop_1 at keyboard.c:1376:15 frame #26: 0x00000001002bdfd0 emacs`internal_condition_case(bfun=(emacs`command_loop_1 at keyboard.c:1270), handlers=(struct Lisp_Symbol *) $438 = 0x0000000100b32f50, hfun=(emacs`cmd_error at keyboard.c:928)) at eval.c:1474:25 frame #27: 0x00000001001a1850 emacs`command_loop_2(handlers=(struct Lisp_Symbol *) $441 = 0x0000000100b32f50) at keyboard.c:1125:11 frame #28: 0x00000001002bd1e8 emacs`internal_catch(tag=(struct Lisp_Symbol *) $444 = 0x0000000100b421f0, func=(emacs`command_loop_2 at keyboard.c:1121), arg=(struct Lisp_Symbol *) $447 = 0x0000000100b32f50) at eval.c:1197:25 frame #29: 0x00000001001a0844 emacs`command_loop at keyboard.c:1103:2 frame #30: 0x00000001001a0694 emacs`recursive_edit_1 at keyboard.c:712:9 frame #31: 0x00000001001a0c68 emacs`Frecursive_edit at keyboard.c:795:3 frame #32: 0x000000010019d420 emacs`main(argc=2, argv=0x000000016fdff3a0) at emacs.c:2523:3 frame #33: 0x0000000100d3108c dyld`start + 520 Lisp backtrace: (unsigned char *) data = 0x00000001004d0dc3 "treesit-node-field-name-for-child" (unsigned char *) data = 0x0000000103967dc8 "treesit-node-field-name" (unsigned char *) data = 0x000000010396a700 "treesit--explorer-draw-node" (unsigned char *) data = 0x000000010396a700 "treesit--explorer-draw-node" (unsigned char *) data = 0x000000010396a700 "treesit--explorer-draw-node" (unsigned char *) data = 0x000000010396a700 "treesit--explorer-draw-node" (unsigned char *) data = 0x000000010396a6b8 "treesit--explorer-refresh" (unsigned char *) data = 0x00000001004b51f2 "apply" (unsigned char *) data = 0x00000001004c04f2 "timer-event-handler"