From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master d582356: * src/fns.c (Frandom): Handle bignum `limit`s Date: Sun, 07 Mar 2021 13:37:39 -0500 Message-ID: References: <20210305170955.27732.27579@vcs0.savannah.gnu.org> <20210305170957.AF99920E1B@vcs0.savannah.gnu.org> <83sg58wu0v.fsf@gnu.org> <83k0qkwnwt.fsf@gnu.org> <838s70wdb5.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="6942"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 07 19:39:45 2021 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 1lIyJd-0001iW-7H for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Mar 2021 19:39:45 +0100 Original-Received: from localhost ([::1]:36210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIyJc-0002BW-82 for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Mar 2021 13:39:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIyHn-0001WY-TW for emacs-devel@gnu.org; Sun, 07 Mar 2021 13:37:51 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIyHl-0001n9-Kb; Sun, 07 Mar 2021 13:37:51 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 82628100257; Sun, 7 Mar 2021 13:37:47 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0AE1010021D; Sun, 7 Mar 2021 13:37:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1615142266; bh=v0HV8sZX9VzwoNYChu67OPTmcXgSTaPS7QOTXG+WLiE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fBpH/6bwFD1lLlGM4DRgc5y59pUvB940l4nPJapCRpHBthkCskPIH4RIoE+YsMP4E B/Nd+SRW/A6mmEJtnCfbxqWcEJmUsCeJ1wRf+mZOGODY8AQjp2w0MJEaOSFFiXmWut mHKakilyvlkJiUPm6GN3TTaIQDVswSzu68qeyhFg83KN0e5jPLqrlr/m/Ghsa0ktOu bV45u0uBo1keIfEo/Pm/V7Qf1FU9vKG4mo3Defw/3+zXyTFAu6jCJAeL5joc6jjyPf fg1XiOx82C7EbzEylKGtXjPePWrYtj0EGUON7RoGcTeE6GwR6bo/e7RkCoPujacjEW iHa9YTYmfusTg== Original-Received: from alfajor (unknown [216.154.43.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C6A2D1201DD; Sun, 7 Mar 2021 13:37:45 -0500 (EST) In-Reply-To: (Pip Cet's message of "Sun, 7 Mar 2021 13:27:01 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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.23 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:266141 Archived-At: >> I don't think I understand how will we know which function says it >> never calls GC. > By tagging it in the source code? Random thoughts on this: - AFAIK in the current code, the places where we can't run GC are much more rare than the cases where we can run GC, so we'd be better off trying to annotate the places where it can't happen. - Those places are currently not annotated at all, by and large. There are a few comments here and there stating that GC shouldn't happen, but those comments shouldn't be trusted. - The trend is to reduce the amount of code where GC cannot take place [ I think and I hope. ] - As you have noted some functions can be called in contexts where they may GC and in other contexts where they may not GC. So we don't have a clear static partitioning of the code. So maybe a dynamic-test approach is the better option (it will rarely catch the unlikely corner cases, but if it does catch them in their rare occurrences it'll still help us diagnose those problems which tend to be very painful to track down). Stefan