From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74966: 31.0.50; Crash report (using igc on macOS) Date: Sat, 21 Dec 2024 15:18:43 +0000 Message-ID: <874j2xhxp2.fsf@protonmail.com> References: <86a5cqkc2g.fsf@gnu.org> <86o716ah09.fsf@gnu.org> <87r062jpi1.fsf@protonmail.com> Reply-To: Pip Cet 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="18268"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , spd@toadstyle.org, Eli Zaretskii , acorallo@gnu.org, 74966@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 21 16:19:20 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 1tP1GB-0004aY-Vs for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Dec 2024 16:19:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tP1Fw-0003D8-IE; Sat, 21 Dec 2024 10:19: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 1tP1Fv-0003Cu-B8 for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 10:19:03 -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 1tP1Fv-00033w-31 for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 10:19:03 -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:References:In-Reply-To:From:Date:To:Subject; bh=RwaKQnUheX69IXORJj5n2s214HW59B9xt+TUUriOIPc=; b=pOmwuf3PJSrX/z/Gfykl+3fjk8yP3nv/1QUJPp2VGBkeiSkdwvP5oakgCmqynIFOksDUcDYkXkAChtclMWsq0pRTsffl4fV4Q0oPngLejDNfNRKZUHL+ilAeVz0toguO1FqXml/Gfe3V6RzrSO9MziDTmBL9oxJgxM4nbb5yWFgJ0DV/Re4GFBrNYKOvnYqnAmWopZb/0Ohi7vvXfZfimDc351bDc3rSmm40AjGhzhPeFO/hVQbhzzXH9jNnAV8iyyH/U9+X1vsifJ5LonhL/PszoEmTnO5XV8zdST0OswcJ22rBQheRhCdcYWSI9lxDQSYFxQ8lrvL2nInkM8EMUA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tP1Fu-0000Hm-UX for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 10:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2024 15:19: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.17347943361075 (code B ref 74966); Sat, 21 Dec 2024 15:19:02 +0000 Original-Received: (at 74966) by debbugs.gnu.org; 21 Dec 2024 15:18:56 +0000 Original-Received: from localhost ([127.0.0.1]:47305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tP1Fn-0000HG-JA for submit@debbugs.gnu.org; Sat, 21 Dec 2024 10:18:55 -0500 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]:64869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tP1Fm-0000H3-Io for 74966@debbugs.gnu.org; Sat, 21 Dec 2024 10:18:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1734794328; x=1735053528; bh=RwaKQnUheX69IXORJj5n2s214HW59B9xt+TUUriOIPc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=SLKdzfgNZGH9THwPUxP7kndDMI6QsVmyk/ODdnGPMrZALSQrhRL7cyLyyPddrSMXY h1MD9MMhBgq+1DGFSD50seJgvoNtE/F2cn7x5cZY302cuKvRIcbJ/4XBWwVQsUC5U8 0SjfpiCzBWHgV25aaL2U4EFXJapGyo9tHj8fbx6bhsIX3Sjqtt8QuRHGabv+qIIOZi LJUgknSZUNs7pnCXA3wdT83mknSF+dDOq7BWNxD2N4FL3BAcqJ4fPwQRQ8L8VV1OeI BLeTSgBNPFMYR6GUcG7yW2jjWnh0WbEmghK1vP0+H/sXsGFCL1zgHXFGrSPvmwzJ1U /s+08YG1OkmzA== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 27c7d0981bec83525c8fa36740467a4d52d1d978 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:297531 Archived-At: "Stefan Monnier" writes: >>> `offset` here should be fixnum that gives the position of this docstrin= g >>> 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 "offset" >> 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 indic= es > into the constant vector from indices into the DOC file. And use one's-complement, I assume, to guard against some future weird nativecomp change resulting in the index -0? :-) I really have no strong preference here. At some point we should remove the DOC hack entirely (pdumper works on FreeDOS here, now; so with the possible exception of Solaris 10 zones on x86 Solaris 11, everyone's going to use pdumper and we can use that to save static data). But now is not a good time to do so, so we should do whatever affects the nativecomp code least. Let's go with the one's complement? (I'd really like to get Emacs working well in low-memory environments, such as embedded systems using SRAM rather than DRAM. I expect most hardware capable of running Emacs will have an MMU, but it might not actually be in use). Pip