Subject: Re: bug#57880: 28.1; Emacs crashes with native compilation on when some antivirus program is running on MS-Windows

From: Ioannis Kappas <[email-masked]>
Date: Wed, 21 Sep 2022 18:19:11 +0100

Hi Eli,

On Wed, Sep 21, 2022 at 12:06 PM Eli Zaretskii <[email-masked]> wrote:

> What would be the purpose of using Emacs with native-compilation on
> such a system?   Users who must cope with such antivirus programs will
> need to use Emacs without native-compilation.  I see no good reason to
> prevent Emacs from crashing, since those *.eln files cannot be used
> anyway, and we will just have a slowed-down Emacs without
> native-compilation.  Right?  Or did I miss something?

A user who experience this issue for the first time and had Emacs crash,
would have no indication whatsoever what hit them, i.e. they wouldn't
know how to
react. Thus my suggestion for checking for the NULL pointer in
unload comp, so that they at least see the error message about
the .eln files being inconsistent and research ways to go around it.

And I can see two ways going forward:
1. Take a step back and switch off native compilation (but how to do this
other than recompiling Emacs?)
2. Stil use native compilation but change the destination .eln directory
  to a safer path, so that they can still rip the benefit. I'd expect the AV
only have a limited set of dirs preventing GetProcAddress of
operating, otherwise nothing would work.

Thanks