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

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

bug#57880: 28.1; Emacs crashes with native compilation on when some anti


From: Andrea Corallo
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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





reply via email to

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