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: Thu, 22 Sep 2022 21:46:14 +0100 Message-ID: References: <83o7v9ugv2.fsf@gnu.org> <83czbnud9d.fsf@gnu.org> <83tu4zstlg.fsf@gnu.org> 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="40522"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57880@debbugs.gnu.org, akrl@sdf.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 22 22:47: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 1obT6N-000AMO-M0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Sep 2022 22:47:19 +0200 Original-Received: from localhost ([::1]:54976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obT6M-0006QG-Fh for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Sep 2022 16:47:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obT66-0006P2-D3 for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 16:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obT66-0004jb-4l for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 16:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obT65-00014j-QE for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 16:47: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: Thu, 22 Sep 2022 20:47: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.16638795954100 (code B ref 57880); Thu, 22 Sep 2022 20:47:01 +0000 Original-Received: (at 57880) by debbugs.gnu.org; 22 Sep 2022 20:46:35 +0000 Original-Received: from localhost ([127.0.0.1]:38681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obT5e-000144-Uy for submit@debbugs.gnu.org; Thu, 22 Sep 2022 16:46:35 -0400 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:44656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obT5a-00013m-PP for 57880@debbugs.gnu.org; Thu, 22 Sep 2022 16:46:34 -0400 Original-Received: by mail-wr1-f53.google.com with SMTP id c11so17340524wrp.11 for <57880@debbugs.gnu.org>; Thu, 22 Sep 2022 13:46:30 -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=MOqKcMpi2atTjBsID2VunjonDfZutTGZLTIs7dQsO3Y=; b=bZP68bm59LJar2zBWzZiN482J0F8COSOH6vRyuJKrU5EL/+QdYlZtdW817RockQHN+ c9l/EueFrqEYiNi5YpDGqcdNZTJsqof7sZwYcrQ00AsECsRdDB/ZePFHDlGCFw7ojOfD PF8UaXzSD/i2vxJ9O254fBO51WpjpWj5txL7VKwLmUa84MCqK5ml69ACplzt5voKFlIf kw6PgEgPnmFiTRo46uHT57p4z06+IbOfLBWYEmc30yAWFTMc3oeyDjXp+ulunN36tVLq WJ+k064rP3zyKO00wuFmYkgCSUUiBrgn0rF5inON686nWebr7heRwQOZWNjU/mUqMBR4 R70w== 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=MOqKcMpi2atTjBsID2VunjonDfZutTGZLTIs7dQsO3Y=; b=nvEywz7EAMGE9/aVNqWcZ/iIs2LDNvqGPG+RCri2Rtfr4FW+Mbvp+eGMyCFNKe64dy mojPnOZ/DutA6zgTHbeJ5UDgp3RuANLoMpfI7sro/IUjAuHD+V0rZ+k85GzSKkoYHaEi tE1/7WvOP7GwEihxTceG+Y0RIn+BbQqHDlZlpHJbZcKDprG76jtSI+7pHmlVcPoAIOa+ qakNE9Vg1bE6NmzmxRXhTUQsHSQ77FbA3ryz7odwdkoRutFbFQCOPFVqPmm+0CZHKJPF ICcYavJud88dc8MqwtpQXGGKEZ8G7VAnf51ODoGIRZ3MuXZTnPaDDU307JeOPLwo+jPn kS7w== X-Gm-Message-State: ACrzQf31VCskLxWG+nRCvnoCikR6CpbnOJHjBNgLPqlmlsY47KYt1K1W GE+lC2qDZ5XxaCB5DsDB9SQr75ZSQUXc6gsvQBQ= X-Google-Smtp-Source: AMsMyM7nFxdYZim/NnLs8e/o+6Utm1Xjh7g6xFFdsMmY18hCNjC1cuXcmF/yTEUpgBkXp+SGvdfvz6qO805foLX14oU= X-Received: by 2002:a5d:6301:0:b0:226:d87b:b55c with SMTP id i1-20020a5d6301000000b00226d87bb55cmr2993484wru.560.1663879584622; Thu, 22 Sep 2022 13:46:24 -0700 (PDT) In-Reply-To: <83tu4zstlg.fsf@gnu.org> 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:243439 Archived-At: Hi Eli, On Thu, Sep 22, 2022 at 9:26 AM Eli Zaretskii wrote: > > 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. > > > Why does the directory where the *.eln files live matter? Doesn't the > > > antivirus software check any loading of any DLL from anywhere on the > > > system? > > > > 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. > 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. > > Anyway, programs are not normally installed under C:\Users, they are > installed under C:\Program Files. Correct, and I believe the AV exploits this, so that it puts stricter controls on the Users dir. > > 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. Thanks