From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41754: [feature/native-comp] Fix crash when loading lambdas from dumps with --enable-checking. Date: Tue, 09 Jun 2020 18:02:49 +0300 Message-ID: <83zh9c5lk6.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="69241"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41754@debbugs.gnu.org, akrl@sdf.org To: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 09 17:04:31 2020 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 1jifni-000Hrz-WC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Jun 2020 17:04:30 +0200 Original-Received: from localhost ([::1]:39752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jifnh-0001bA-I1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Jun 2020 11:04:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jifnG-0001ZS-Ja for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2020 11:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jifnG-0008TA-9P for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2020 11:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jifnG-0003Gv-5D for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2020 11:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jun 2020 15:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41754 X-GNU-PR-Package: emacs Original-Received: via spool by 41754-submit@debbugs.gnu.org id=B41754.159171501212537 (code B ref 41754); Tue, 09 Jun 2020 15:04:02 +0000 Original-Received: (at 41754) by debbugs.gnu.org; 9 Jun 2020 15:03:32 +0000 Original-Received: from localhost ([127.0.0.1]:60589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jifml-0003G8-Sk for submit@debbugs.gnu.org; Tue, 09 Jun 2020 11:03:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jifmW-0003Fa-1w for 41754@debbugs.gnu.org; Tue, 09 Jun 2020 11:03:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43139) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jifmQ-0008Or-Pv; Tue, 09 Jun 2020 11:03:10 -0400 Original-Received: from [176.228.60.248] (port=3091 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jifmP-0004JB-9L; Tue, 09 Jun 2020 11:03:10 -0400 In-Reply-To: (message from Nicolas =?UTF-8?Q?B=C3=A9rtolo?= on Tue, 9 Jun 2020 08:54:45 -0300) 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" Xref: news.gmane.io gmane.emacs.bugs:181787 Archived-At: > From: Nicolas BĂ©rtolo > Date: Tue, 9 Jun 2020 08:54:45 -0300 > Cc: 41754@debbugs.gnu.org > > - Copy the suffixes before building the heap-based list in openp. I know this is > not the solution I proposed in the bug report, but I couldn't adapt the code > without increasing its complexity way too much for my liking. If you think > this is not an appropriate solution I will come up with another one. This conses a string for each extension each time through the loop, doesn't it? Is that really necessary? Maybe we should take a step back and consider restructuring the code a bit. AFAIU, you cons the extended_suf list to be able to use the FOR_* loops that manipulate lists, is that correct? If so, could it be that removing that constraint will lead to a more elegant and less expensive code? After all, all this function does is to append STR to each directory in PATH, then try finding the resulting file with or without one of the extensions in SUFFIXES. Could we produce the file name to probe without walking a single list?