bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41754: [feature/native-comp] Fix crash when loading lambdas from dum


From: Eli Zaretskii
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

> From: Nicolas Bértolo <nicolasbertolo@gmail.com>
> 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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]