unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <akrl@sdf.org>
To: Ioannis Kappas <ioannis.kappas@gmail.com>
Cc: 57880@debbugs.gnu.org
Subject: bug#57880: 28.1; Emacs crashes with native compilation on when some antivirus program is running on MS-Windows
Date: Wed, 21 Sep 2022 19:26:08 +0000	[thread overview]
Message-ID: <xjfa66sbkbz.fsf@ma.sdf.org> (raw)
In-Reply-To: <CAMRHuGBt_+GacqKYp-Cddk+-H1oxydoHsekkF-GqBRuhGK5w7A@mail.gmail.com> (Ioannis Kappas's message of "Tue, 20 Sep 2022 17:43:10 +0100")

Ioannis Kappas <ioannis.kappas@gmail.com> writes:

> Hi Andrea,
> On Mon, Sep 19, 2022 at 9:14 AM Andrea Corallo <akrl@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.

Okay, I think then is a good idea to guard against the NULL pointer
potentially returned, OTOH we do it already in the rest of the code.

I'm only not sure if we should signal an error or not here.

  Andrea





  parent reply	other threads:[~2022-09-21 19:26 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
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 [this message]
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=xjfa66sbkbz.fsf@ma.sdf.org \
    --to=akrl@sdf.org \
    --cc=57880@debbugs.gnu.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).