From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#74966: 31.0.50; Crash report (using igc on macOS) Date: Tue, 31 Dec 2024 05:22:11 -0500 Message-ID: References: <86a5cqkc2g.fsf@gnu.org> <86o716ah09.fsf@gnu.org> <87r062jpi1.fsf@protonmail.com> <874j2xhxp2.fsf@protonmail.com> <86jzbt6mh7.fsf@gnu.org> 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="37506"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: gerd.moellmann@gmail.com, spd@toadstyle.org, Pip Cet , monnier@iro.umontreal.ca, 74966@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 31 11:23: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 1tSZPG-0009aU-5C for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Dec 2024 11:23:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSZOy-0007rX-DZ; Tue, 31 Dec 2024 05:23:04 -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 1tSZOw-0007rJ-Px for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 05:23:02 -0500 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 1tSZOw-0005Kn-HE for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 05:23:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=zoFjJY1Y9SRe5kOrTibwOa9cjZinFww548hRiYZUfeE=; b=A2isOGeuI3gVmy3+lXIwavII9E7ebvpmM9wVbmGNErOLtnsHuIDJz+2vxUVki/z547kQd1LTzneUzo7I8H2m5VV0pRw6IzZSCi9btOcQDFKKRtcLnlw7Um0VES7jQbxVQ0f0iIaNL4ezIUAYVZhAHT5TnB/dG7unTvuMCjkX9f9pc0z6AzJ2Gp9nJupk9SCWgAzmGOZ3rEGAjS3SUUdz3xV3NWelOigNTugmuazoF+oYCKAJwGHKqkfCbWerreRiXXqTX4NC3tiak79xACT84FG7vnDf4lKHPiVGQE0mtFsoh/IpBBg7PtvD/f3B13rZi9DR3Wu8E+z7DEmpM4dpWw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tSZOw-0003LY-C5 for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 05:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Dec 2024 10:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74966 X-GNU-PR-Package: emacs Original-Received: via spool by 74966-submit@debbugs.gnu.org id=B74966.173564054112792 (code B ref 74966); Tue, 31 Dec 2024 10:23:02 +0000 Original-Received: (at 74966) by debbugs.gnu.org; 31 Dec 2024 10:22:21 +0000 Original-Received: from localhost ([127.0.0.1]:33986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSZOH-0003KF-BF for submit@debbugs.gnu.org; Tue, 31 Dec 2024 05:22:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSZOF-0003K1-5Y for 74966@debbugs.gnu.org; Tue, 31 Dec 2024 05:22:19 -0500 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 1tSZO8-0005J6-6C; Tue, 31 Dec 2024 05:22:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=zoFjJY1Y9SRe5kOrTibwOa9cjZinFww548hRiYZUfeE=; b=kvwAIBvuScYHPZ1fFdJH 4/K0GoRU55lMOvk9PHuaE4lqV7VY9skHbVqKMFjWVdd+uAXM7kP+yw+esaiA5mczIQEQH2/6K0wm6 Yaoj5bkIhWv2IeXN976X7SBZdpOUOYOXKJmREiYAM6UewDo2S0Bwqm0shYKZ78eQJ6rUTd/s3LtjH 6sDXsrxTaJiZuPCSRIXfHawXl+QdlAad7CmZOZLup7P+VK94FCkN6jP1+BjQcxR07XZFHsxgVv5OE 3Jy+xWgpo9p4gt/ppaVyGrZvvUA+JEVZPImSr7bDUdYYwOUflwJB9RqakEYuqs5tN5Tk57AUhxxlJ B5jMnTkKwQGAow==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1tSZO7-0006Cz-Sr; Tue, 31 Dec 2024 05:22:11 -0500 In-Reply-To: <86jzbt6mh7.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Dec 2024 18:15:48 +0200") 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:298038 Archived-At: Eli Zaretskii writes: >> Date: Sat, 21 Dec 2024 15:18:43 +0000 >> From: Pip Cet >> Cc: Gerd M=C3=B6llmann , Eli Zaretskii , acorallo@gnu.org, spd@toadstyle.org, 74966@debbugs.gnu.org >>=20 >> "Stefan Monnier" writes: >>=20 >> >>> `offset` here should be fixnum that gives the position of this docst= ring >> >>> in the DOC file. And FUN should be a function for which we found >> >> >> >> Yes, but the nativecomp code assumes ->doc is an index into a >> >> nativecomp'd subr's constant vector. >> > >> > Aha! >> > >> >> So we overwrite it with a docfile >> >> index, access an out-of-bounds index and crash. >> >> >> >> I think the best thing to do is to use separate fields for the "offse= t" >> >> doc and the "index" doc; or at least, the second best thing, after >> >> removing the entire docfile hack. >> > >> > I think a much simpler change is to use the sign bit to distinguish in= dices >> > into the constant vector from indices into the DOC file. >>=20 >> And use one's-complement, I assume, to guard against some future weird >> nativecomp change resulting in the index -0? :-) >>=20 >> I really have no strong preference here. > > And I still want to hear from Andrea. It's his code, so the solution > he prefers gets my vote. Sorry for behing late here. I'm for the sign bit, it saves memory (why not), and we can sanity check that when the bit is set the function is a non-primitve one and vice versa. Andrea