GNU bug report logs - #57880
28.1; Emacs crashes with native compilation on when some antivirus program is running on MS-Windows

Previous Next

Package: emacs;

Reported by: Ioannis Kappas <ioannis.kappas <at> gmail.com>

Date: Sat, 17 Sep 2022 11:15:02 UTC

Severity: normal

Found in version 28.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 57880 <at> debbugs.gnu.org (full text, mbox):

From: Ioannis Kappas <ioannis.kappas <at> gmail.com>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: 57880 <at> debbugs.gnu.org
Subject: Re: bug#57880: 28.1; Emacs crashes with native compilation on when
 some antivirus program is running on MS-Windows
Date: Tue, 20 Sep 2022 17:43:10 +0100
Hi Andrea,
On Mon, Sep 19, 2022 at 9:14 AM Andrea Corallo <akrl <at> sdf.org> wrote:

> I'm not sure I understand why the issue is only in 'unload_comp_unit'
> and not in all the other places where we use and rely on 'dynlib_sym'
> (ex in 'make_subr').

It is because `make_subr', or any of other relevant fns, is not given a
chance to execute. The eln file is loaded fine, but the search for the
COMP_UNIT_SYM'bol in the eln is unsuccessful (due to AV interference),
the file is considered invalid, and the only path left to take is to unload it.


> Also I've a question (no windows expert here), can GetProcAddress return
> NULL?

Yes, as per https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress:

  Return value

  If the function succeeds, the return value is the address of the
exported function or variable.

  If the function fails, the return value is NULL. To get extended
error information, call GetLastError.


I've also noticed another more surgical way to redirect the .eln cache
elsewhere, though is only available on the 29 branch:

;; in early-init.el
(when (> emacs-major-version 28)
  (startup-redirect-eln-cache "/to/a/safe/haven"))

Thanks




This bug report was last modified 2 years and 40 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.