From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ioannis Kappas 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: Tue, 20 Sep 2022 17:43:10 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11286"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57880@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 20 23:39:23 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 1oakxf-0002lH-CI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Sep 2022 23:39:23 +0200 Original-Received: from localhost ([::1]:51480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oakxe-000274-Bn for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Sep 2022 17:39:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oagLu-0006MH-66 for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 12:44:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oagLq-0003i1-Cm for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 12:44:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oagLp-0001rd-Tn for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 12:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ioannis Kappas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 16:44:01 +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.16636922057114 (code B ref 57880); Tue, 20 Sep 2022 16:44:01 +0000 Original-Received: (at 57880) by debbugs.gnu.org; 20 Sep 2022 16:43:25 +0000 Original-Received: from localhost ([127.0.0.1]:59483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oagLE-0001qf-Q3 for submit@debbugs.gnu.org; Tue, 20 Sep 2022 12:43:25 -0400 Original-Received: from mail-wr1-f44.google.com ([209.85.221.44]:36823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oagLD-0001qU-SL for 57880@debbugs.gnu.org; Tue, 20 Sep 2022 12:43:24 -0400 Original-Received: by mail-wr1-f44.google.com with SMTP id y5so5296130wrh.3 for <57880@debbugs.gnu.org>; Tue, 20 Sep 2022 09:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=Mda3YpdCtz0y7vcUo2p+CJKWbg/DQ3inG3b/SFsnaKM=; b=ZyWVdm6YS9+NY9FX0pOwx09DrwFRf1n+Ub2/DSN+aTa78HS7LvIwM+GtzhBaZdr1/j 2jEedffX5yb+DfLMCb80RKeK53TIJDRExOGIa1mVgjKG7KFZLu5CFP4BPU7tmitGtQcb UUDJrAzECukBJ3rTp8ZIWeMON2WXFbELzrqgpjaK4vKuoZzF+ErmyuqccCRwoE2k3r2U WfM/Ub9+e8ruKgHzkwc5NA45MlA34ye2fTKRRDLvsIwsyB7LQK1IORIeh9r+X6hA0Ngj hb8O8rr4KsB85p9ylzxJXhrQE/gc9KP1YGWJ2muU5qrRTyFaO0sh8OrBG95GmACNyZxW TOYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=Mda3YpdCtz0y7vcUo2p+CJKWbg/DQ3inG3b/SFsnaKM=; b=r6192qc/mpLKkPCqSMq39Zwe9Qzd6GKdPqncQuccjkr3OXbOPz4mwsRI0ESa8U/J7S YaTu3Ykl/ZJmc5l9yVHKCNkUw/LYUadDi4yxf23JHjrF2GdlSjr/keqlW2HwoUK2k8FU HiJguVvrypqqLq41wY4LvBl4Q5EeKeTAo+N8UxD7uzI5wp0iFy75pw5pmQzJpDKIrkyt nnTZbhxf+P7HT11WGsnGPpolLmlHvSKPEEMsDZZnVQt4uEtH1hTTZjtwNHbdqaHsytRK pMVZ//doR2GDPKloHLNMIPBJStF8pK38aB2B7nJjibYhyBuUpOJW/OJGPKLkXNC+8ekH lrSA== X-Gm-Message-State: ACrzQf0mg/u3A+UInkpbD107AozCZ108rIDR5DJTt6on33dwiYcPccV0 1AzLH6P8NUB6eSoTFlVGrqGnpOlwMQZpA99w57Kz0CQ+nwnSzA== X-Google-Smtp-Source: AMsMyM42d76etKtUchYqDZsJ+4/acMTSBGnMYe0IqEGKB29z0xb8IDs2865QfhpeMw0ZyqfMDgucRwoszHyCMfsmMOw= X-Received: by 2002:adf:eb50:0:b0:21e:3d13:3a91 with SMTP id u16-20020adfeb50000000b0021e3d133a91mr14161227wrn.484.1663692198106; Tue, 20 Sep 2022 09:43:18 -0700 (PDT) In-Reply-To: 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:243236 Archived-At: Hi Andrea, On Mon, Sep 19, 2022 at 9:14 AM Andrea Corallo 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