From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#57880: 28.1; Emacs crashes with native compilation on when some antivirus program is running on MS-Windows Date: Mon, 19 Sep 2022 08:13:41 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="560"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57880@debbugs.gnu.org To: Ioannis Kappas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 19 10:58:20 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oaCbc-000AUs-BT for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 10:58:20 +0200 Original-Received: from localhost ([::1]:40920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaCbb-00059N-AF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 04:58:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaBvi-00043t-HQ for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:15:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53187) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaBvi-0008SC-8U for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaBvi-00086i-3c for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57880 X-GNU-PR-Package: emacs Original-Received: via spool by 57880-submit@debbugs.gnu.org id=B57880.166357526931108 (code B ref 57880); Mon, 19 Sep 2022 08:15:02 +0000 Original-Received: (at 57880) by debbugs.gnu.org; 19 Sep 2022 08:14:29 +0000 Original-Received: from localhost ([127.0.0.1]:52265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBvB-00085f-5a for submit@debbugs.gnu.org; Mon, 19 Sep 2022 04:14:29 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:58194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBv5-00085R-QK for 57880@debbugs.gnu.org; Mon, 19 Sep 2022 04:14:27 -0400 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 28J8Df5d029443 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 19 Sep 2022 08:14:21 GMT In-Reply-To: (Ioannis Kappas's message of "Sat, 17 Sep 2022 12:14:36 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243054 Archived-At: Ioannis Kappas writes: > Hi, > > there appears to be an issue with native compilation and some > antivirus programs on MS-Windows that could cause Emacs to crash. > > This can happen when the antivirus program rewires GetProcAddress > system fn to return NULL on a call to get the address of an exported > variable/function, of which native compilation makes use of to > identify features of the compiled code. > > I can't think of any straightforward instructions to reproduce the > issue without such antivirus programs running, but the crash happens > when an .el file has been compiled and the native code is partially > loaded and then there is an attempt to unload it with the > unload_comp_unit fn below Hi Ioannis, 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'). Also I've a question (no windows expert here), can GetProcAddress return NULL? Thanks Andrea