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.devel Subject: Re: Suppressing native compilation (short and long term) Date: Sat, 15 Oct 2022 15:19:40 +0000 Message-ID: References: <87ill8paw7.fsf@trouble.defaultvalue.org> <83o7uzivey.fsf@gnu.org> <3ac9d2b9632f75018327a1bcde0c373f152c404a.camel@gmail.com> <835ygob7ja.fsf@gnu.org> <8335bra2rl.fsf@gnu.org> <87ilkncugg.fsf@gnus.org> <83zgdz7x8u.fsf@gnu.org> <83mt9x7ek2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4927"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: larsi@gnus.org, monnier@iro.umontreal.ca, liliana.prikler@gmail.com, rlb@defaultvalue.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 15 17:21:31 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ojiyg-000137-KF for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Oct 2022 17:21:30 +0200 Original-Received: from localhost ([::1]:44210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojiyf-0006vk-Gn for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Oct 2022 11:21:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojix3-00051b-Il for emacs-devel@gnu.org; Sat, 15 Oct 2022 11:19:56 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:55927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojix1-0003dx-A0; Sat, 15 Oct 2022 11:19:49 -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 29FFJetu022961 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 15 Oct 2022 15:19:41 GMT In-Reply-To: <83mt9x7ek2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Oct 2022 10:04:45 +0300") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297786 Archived-At: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: Lars Ingebrigtsen , monnier@iro.umontreal.ca, >> liliana.prikler@gmail.com, rlb@defaultvalue.org, emacs-devel@gnu.org >> Date: Fri, 14 Oct 2022 23:20:43 +0000 >> >> Eli Zaretskii writes: >> >> >> .elc -> .eln generation is off, but trampolines are on, and comp.el >> >> forks an Emacs to generate those, too, I think? So if the forked Emacs >> >> also needs to generate the same trampoline, you have an infinite >> >> recursion fork bomb. >> > >> > Andrea, how can we prevent that? >> >> Dumb question: can't we just run the spawned compilation processes with >> --no-site-file? > > I don't think I understand how --no-site-file could help. Are you > assuming that such advises could only come from sit-init files? Yes this was the assumption. > If > so, I'm sure they could come from other sources, or what am I missing? I think you are not missing much... as not said. >> Other option is to break circularity with an ad-hoc global variable set >> in the spawned process. I've a cooked patch for that but no energy left >> to test it tonight. If that's the preferred way I can test and push it >> tomorrow. > > Maybe it's preferable, but I'm not sure the idea of the change I get > from your short description is what you really meant. Can you tell > more about that? What ad-hoc variables did you have in mind, and how > would we use them in this case to prevent infinite forking of > sub-processes? We define a new variable say `comp-spawned-compilation' and we set it to t in all spawed compilation sub processes. Then when we need a trampoline: - If it's available we load it. - If it's not and `comp-spawned-compilation' is nil we compile it and load it, otherwise if `comp-spawned-compilation' is t we just do nothing (so we break circularity). WDYT? Bests Andrea