From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland Date: Fri, 06 Sep 2024 09:05:55 +0300 Message-ID: <86v7z91flo.fsf@gnu.org> References: <8734mezkgo.fsf@gmail.com> <8634me447j.fsf@gnu.org> <861q1y437s.fsf@gnu.org> <86wmjq2mr2.fsf@gnu.org> <875xrars34.fsf@protonmail.com> <87h6aunilt.fsf@gmail.com> <87zfomqbgk.fsf@protonmail.com> <875xrani8k.fsf@gmail.com> <86bk122azc.fsf@gnu.org> <87v7zagcal.fsf@gmail.com> <867cbp3nw7.fsf@gnu.org> <87v7z9msrl.fsf@gmail.com> <874j6tqxyg.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13637"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Eval EXEC Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 06 08:06:55 2024 Return-path: Envelope-to: ged-emacs-devel@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 1smS7S-0003Ot-Bd for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Sep 2024 08:06:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smS6d-0001XK-1q; Fri, 06 Sep 2024 02:06:03 -0400 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 1smS6Z-0001X5-Jq for emacs-devel@gnu.org; Fri, 06 Sep 2024 02:05:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smS6Y-0005qp-Op; Fri, 06 Sep 2024 02:05:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9KmTYA0yfV2goOZ5f1YEimSHacv+pyuBK0EMVLpJhYQ=; b=giZ5EY+wY9r6 H45CbtNB/2S4AX1lfunl7sSI6Ra4ZrQWz+Ud6aHHp3OMOrAyBT1htqb+Kdl7aG5LB4nvqozsfu6Vo QHJUpcJu4PmciWCztSSN/LeyZVR+Fxf8GPEXyAaXt60TLfCOJCaF4dkPUUcvb10jzA5WLWBDFKIU8 JCVVak6dP/HFCfpeI1iFy5dwGYaWbC2mDlW/hHsU0GZMWNUR+cRA19cQMUu6EeOxjLb8gcH1BKoPE RctZly6kdxA5AgoryWXL4XqcDKlQJUn3CmlGrXPcE1ggVCQJNOfn6oF+lnqn52i32pso26kaH1MKO i/F4PwWyVXGUL58/ziunKw==; In-Reply-To: <874j6tqxyg.fsf@gmail.com> (message from Eval EXEC on Fri, 06 Sep 2024 11:10:15 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323442 Archived-At: > From: Eval EXEC > Cc: pipcet@protonmail.com, gerd.moellmann@gmail.com, emacs-devel@gnu.org > Date: Fri, 06 Sep 2024 11:10:15 +0800 > > Eval EXEC writes: > > > I recompiled commit 95a30325a84 (HEAD -> scratch/igc, origin/scratch/igc) > > * src/igc.c (fix_frame): Correct the previous change. > > > > After testing, I believe the issue has been resolved. > > scratch/igc 95a30325 crash again: > > I use latest scratch/igc commit: * 95a30325a84 - (HEAD -> scratch/igc, origin/scratch/igc) * src/igc.c (fix_frame): Fix last change. (8 hours ago) > > #5 igc_assert_fail (file=, line=, msg=) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/igc.c:209 It's an assertion violation, and it's too bad 'msg' is "optimized out", because it's valuable information. This is a different problem, I think. > #9 0x0000000000690c05 in fix_lisp_obj (ss=ss@entry=0x7ffc7653e6f8, pobj=pobj@entry=0x7f08addd06b8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/igc.c:975 > off = > client = > base = 0x7f088a262a50 > res = > new_off = > p = 0x7f08addd06b8 > word = > tag = > _ss = 0x7ffc7653e6f8 > _mps_zs = > _mps_ufs = 36029896530599944 > _mps_wt = > _mps_w = > #10 0x00000000006919f8 in fix_cons (cons=0x7f08addd06b0, ss=0x7ffc7653e6f8) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/igc.c:1751 > res = > _ss = 0x7ffc7653e6f8 > _mps_zs = > _mps_ufs = 36028797018972168 > _mps_wt = > _mps_w = So this says we hit the trouble while fixing a car of a cons: static mps_res_t fix_cons (mps_ss_t ss, struct Lisp_Cons *cons) { MPS_SCAN_BEGIN (ss) { IGC_FIX12_OBJ (ss, &cons->u.s.car); <<<<<<<<<<<<<<<<<<<<< IGC_FIX12_OBJ (ss, &cons->u.s.u.cdr); } MPS_SCAN_END (ss); return MPS_RES_OK; } static mps_res_t fix_lisp_obj (mps_ss_t ss, Lisp_Object *pobj) { MPS_SCAN_BEGIN (ss) { mps_word_t *p = (mps_word_t *) pobj; mps_word_t word = *p; /* Quickly rule out Qnil, and prevent subtraxting from a null pointer. */ if (word == 0) return MPS_RES_OK; mps_word_t tag = word & IGC_TAG_MASK; if (tag == Lisp_Int0 || tag == Lisp_Int1) return MPS_RES_OK; else if (tag == Lisp_Type_Unused0) emacs_abort (); if (tag == Lisp_Symbol) { ptrdiff_t off = word ^ tag; mps_addr_t client = (mps_addr_t) ((char *) lispsym + off); mps_addr_t base = client; if (MPS_FIX1 (ss, base)) { mps_res_t res = MPS_FIX2 (ss, &base); <<<<<<<<<<<<<<<<<<< I guess it would be interesting to see what was the cons and what was the symbol that was its car? Like this: (gdb) frame 9 (gdb) p *pobj (gdb) xtype (gdb) xsymbol (gdb) frame 10 (gdb) p *cons (gdb) xcons (gdb) p *xcons (gdb) xcdr (gdb) xtype