unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ioannis Kappas <ioannis.kappas@gmail.com>
Cc: 57880@debbugs.gnu.org, akrl@sdf.org
Subject: bug#57880: 28.1; Emacs crashes with native compilation on when some antivirus program is running on MS-Windows
Date: Thu, 22 Sep 2022 09:36:14 +0300	[thread overview]
Message-ID: <83czbnud9d.fsf@gnu.org> (raw)
In-Reply-To: <CAMRHuGC-c5nK5zM=XL+skSMdYb9mf737ePB69w4OCvNcz6zzRw@mail.gmail.com> (message from Ioannis Kappas on Wed, 21 Sep 2022 18:19:11 +0100)

> From: Ioannis Kappas <ioannis.kappas@gmail.com>
> Date: Wed, 21 Sep 2022 18:19:11 +0100
> Cc: akrl@sdf.org, 57880@debbugs.gnu.org
> 
> On Wed, Sep 21, 2022 at 12:06 PM Eli Zaretskii <eliz@gnu.org> 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.

How can an average user go about researching this?  They'd need a
debugger, a binary with debug info, and probably also a way of
compiling Emacs.  That doesn't sound like a typical Windows user to
me.

When Emacs crashes, they will report a bug, or ask on some forum.  We
can have this issue and its solutions described in PROBLEMS, so we
could point them to that place.  We could even mention this in the
README that accompanies the Windows binaries (if we believe users
actually read that).  One way or another, if this issue happens
frequently, the information will spread widely enough for people to be
able to find it by a simple Internet search.

Btw, which antivirus software have this "feature"?  If it's widely
used, perhaps the "official" Emacs binaries should not be distributed
with native-compilation enabled at all?

> 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.

Why does the directory where the *.eln files live matter?  Doesn't the
antivirus software check any loading of any DLL from anywhere on the
system?

In any case, the *.eln files have at least two places on any system,
and only one of them can be changed, the other one is fixed by the
build.





  reply	other threads:[~2022-09-22  6:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17 11:14 bug#57880: 28.1; Emacs crashes with native compilation on when some antivirus program is running on MS-Windows Ioannis Kappas
2022-09-19  8:13 ` Andrea Corallo
2022-09-20 16:43   ` Ioannis Kappas
2022-09-21 11:06     ` Eli Zaretskii
2022-09-21 17:19       ` Ioannis Kappas
2022-09-22  6:36         ` Eli Zaretskii [this message]
2022-09-22  6:55           ` Ioannis Kappas
2022-09-22  8:26             ` Eli Zaretskii
2022-09-22 20:46               ` Ioannis Kappas
2022-09-23  5:53                 ` Eli Zaretskii
2022-09-23 16:43                   ` Ioannis Kappas
2023-06-07 21:13                     ` Andrea Corallo
2023-06-08  5:31                       ` Eli Zaretskii
2022-09-21 19:26     ` Andrea Corallo
2022-09-22  6:38       ` Eli Zaretskii
2022-09-22  8:09         ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83czbnud9d.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=57880@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=ioannis.kappas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).