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.bugs Subject: bug#70182: [PATCH] Fix + ert for segmentation fault in get-variable-watchers (1 of 9) Date: Sat, 06 Apr 2024 10:25:11 +0300 Message-ID: <86sezz3qco.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21035"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70182@debbugs.gnu.org To: Robert Burks Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 06 09:26:22 2024 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 1rt0RS-0005Ke-B9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Apr 2024 09:26:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rt0R5-0004Hz-18; Sat, 06 Apr 2024 03:25:59 -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 1rt0R3-0004Ha-Ad for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 03:25:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rt0R1-00072Q-MS for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 03:25:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rt0R7-00053b-Lh for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 03:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Apr 2024 07:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70182 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70182-submit@debbugs.gnu.org id=B70182.171238832719280 (code B ref 70182); Sat, 06 Apr 2024 07:26:01 +0000 Original-Received: (at 70182) by debbugs.gnu.org; 6 Apr 2024 07:25:27 +0000 Original-Received: from localhost ([127.0.0.1]:38071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rt0QZ-00050u-2J for submit@debbugs.gnu.org; Sat, 06 Apr 2024 03:25:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rt0QX-00050R-3F for 70182@debbugs.gnu.org; Sat, 06 Apr 2024 03:25:25 -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 1rt0QL-0006sA-On; Sat, 06 Apr 2024 03:25:13 -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=dUW/cbGjVT8mU0eWKM8cOHrBIG8isGjbxBkZMUUjWGE=; b=Q4pEKd2Ejz3q TLyyMiDCSxa4/APQE1y+b0syIA1mV9h1px4+9VyDzFZhDvx9GbU6Q3pyORB90jnU8+0nmaecjOGYA rm9pMBaqCph/VsaEtepVzuyhzCbohQZ43aAcnCihLv3XaimaPcZCD6l535BAKTC9M4rA9Wmp3nG4i q3+oCj3prRHonOoduOhxDi6rm9sOLzu09ejStU8CmR9djWe2TCfIXQ2NsyKp80beTjEpassw6n9ao KXkCcYfwvvnLtJuoGXtVELafKdsj4NYLpLZrKJ6aYb7qT2uj6ai2Ic1DjjrkU3CvghgvOs0p9NFa9 q//YZn2VQZwBcmcsjyNHqw==; In-Reply-To: (message from Robert Burks on Thu, 4 Apr 2024 04:44:22 -0400) 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:282747 Archived-At: > From: Robert Burks > Date: Thu, 4 Apr 2024 04:44:22 -0400 > > +++ b/src/data.c > @@ -1838,7 +1838,7 @@ SYMBOL (or its aliases) are set. */) > (Lisp_Object symbol, Lisp_Object watch_function) > { > symbol = Findirect_variable (symbol); > - Lisp_Object watchers = Fget (symbol, Qwatchers); > + Lisp_Object watchers = Fget (symbol, Qwatchers); /* CHECK_SYMBOL is in Fget */ This commentary is not needed here, so please remove it. Also, please note that our conventions are to end a comment in a period and two spaces. > + symbol = Findirect_variable (symbol); > + CHECK_SYMBOL (symbol); /* BUG#00000 Must guard SYMBOL_TRAPPED_WRITE_P */ This comment is also redundant: the fact that we check a symbol doesn't need any explanations. Thanks.