From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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: Fri, 23 Sep 2022 08:53:12 +0300 Message-ID: <83k05ur60n.fsf@gnu.org> References: <83o7v9ugv2.fsf@gnu.org> <83czbnud9d.fsf@gnu.org> <83tu4zstlg.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24612"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57880@debbugs.gnu.org, akrl@sdf.org To: Ioannis Kappas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 23 07:54:26 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 1obbdp-0006Cn-MI for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 07:54:25 +0200 Original-Received: from localhost ([::1]:59534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obbdo-00086p-1m for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 01:54:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obbdS-00086R-H3 for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 01:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obbdS-0005G1-3m for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 01:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obbdR-0006bQ-Pl for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 01:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Sep 2022 05:54: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.166391239225320 (code B ref 57880); Fri, 23 Sep 2022 05:54:01 +0000 Original-Received: (at 57880) by debbugs.gnu.org; 23 Sep 2022 05:53:12 +0000 Original-Received: from localhost ([127.0.0.1]:39111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obbcd-0006aJ-Cj for submit@debbugs.gnu.org; Fri, 23 Sep 2022 01:53:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obbca-0006a5-Du for 57880@debbugs.gnu.org; Fri, 23 Sep 2022 01:53:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obbcU-00057H-Ja; Fri, 23 Sep 2022 01:53:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=j2pVEAXbEj2XlgYLavSuUN8sO52CY+gYxxupMABmwZY=; b=iK404NUMS8Qu u6h7gjwAs3yM4xaSr4/Th0JNfTMad4zMm6mqgvR4c/yFQbxVH5BwoPVocNWFVrLcco/XXCyBOIH15 TVh8Y/FIj+HnuKRKadkGh+iVmv6Dpo8nFO09l3ppPBHQl2BHnPmPsKR+FqYgR0652ScEXxnZxWJ2V am/xmUn/AuDbDyyaxxUu3EUH7VG6rjCLy8cTHsr6U65GDGKlM5MYe4LB4LzfmVCF0VT9xbPzj+akS 7wQA7KHrKdFgBEUwGGANYeNrTIGjQLQO46OFIQkBMw9AivZBruTyhMQUejHdeD9yQycM1MepfrSP1 AVj9baJH0UcZn2rOmcMOQA==; Original-Received: from [87.69.77.57] (port=4123 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obbcT-0002lO-0c; Fri, 23 Sep 2022 01:53:02 -0400 In-Reply-To: (message from Ioannis Kappas on Thu, 22 Sep 2022 21:46:14 +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:243448 Archived-At: > From: Ioannis Kappas > Date: Thu, 22 Sep 2022 21:46:14 +0100 > Cc: akrl@sdf.org, 57880@debbugs.gnu.org > > > > Or could there be an early init option to bypass the native compilation. This > > > way the users can test the issue with is native comp. > > > > There is one already. > > Are you referring to an option for building form source? I couldn't > find an option > to turn off native compile for the precompiled windows binaries (such as those > retrieved from the official ftp site or from msys2 pacman) that can configured > to disable native comp. It's native-comp-deferred-compilation: set it to nil. For a good measure, also set comp-enable-subr-trampolines to nil. Emacs does this automatically at startup if libgccjit cannot be loaded. > > > Perhaps it only matters for the User directory. AVs want to put more > > > stricter control > > > on the binaries the user downloads and installs themselves. > > > > Is that known, or is this just a guess? > > This is an educated guess. The only facts are that > (1) Emacs crashes the moment it tries to read .eln files from the > c:/Users/* directory, > (2) throws an "emacs module is not GPL compatible" error when > loading native modules from the same dir. > (3) and these are all side effect of trying to use GetProcAddress on a > dll/eln file residing in the C:/Users/* dir. Both (1) and (2) work otherwise. So you are saying that if someone installs Emacs under C:/Users, that Emacs will not work, regardless of the native-compilation, because it will be unable to load the DLLs which come in the Emacs binary distribution, for example the image libraries? Then it is strange that we haven't heard about such a major issue with Emacs on Windows until now. > > Also, I asked which AV software has this problem. Do you happen to > > know? > > Here is an old article that I found published by the AV maker in question, > referring to how most of windows viruses use GetProcAddress > > https://community.broadcom.com/symantecenterprise/viewdocument/fighting-epo-viruses > > """... . Most Windows viruses use the GetProcAddress API to obtain > needed API addresses for their future execution ... """ > > and I believe this the reasons why they try to restrict its use in the User's > directory, where it is unusual for mainstream programs to be installed, > as per your comment below. Thanks, but that doesn't really answer my question, which was about the specific brands of AV software _known_ to do this. You seem to saying that the answer is 'all of them", but I'm asking what are the brands with which this was actually seen. > > > Those precompiled with Emacs are fine in this use case since they are > > > not stored in the Users directory, it's only newly compiled files that > > > exhibit this issue because they store the .eln files in the user dir by > > > default. > > > > This means that the problem will only affect people who have libgccjit > > and GCC/Binutils installed, because otherwise Emacs will be unable to > > compile new *.eln files. Right? > > Yes, since I understand Emacs won't be able to generate any new .eln files > without access to libgccjit. So then we can tell such people (which are relatively rare) to have their home directory outside of the C:/Users tree.