From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.lisp.guile.devel Subject: [PATCH devel 2/6] Work around Guile 3.0.0 miscompilation at -O2. Date: Thu, 4 Mar 2021 21:35:20 -0500 Message-ID: <20210305023524.15317-2-maxim.cournoyer@gmail.com> References: <8735xapc3x.fsf@gmail.com> <20210305023524.15317-1-maxim.cournoyer@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33223"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Maxim Cournoyer To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Mar 05 04:04:03 2021 Return-path: Envelope-to: guile-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 1lI0l1-0008WT-Hh for guile-devel@m.gmane-mx.org; Fri, 05 Mar 2021 04:04:03 +0100 Original-Received: from localhost ([::1]:39118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lI0l0-0004q9-Jk for guile-devel@m.gmane-mx.org; Thu, 04 Mar 2021 22:04:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lI0Jv-0006nB-9H for guile-devel@gnu.org; Thu, 04 Mar 2021 21:36:03 -0500 Original-Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:38013) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lI0Jt-0007T1-Q1; Thu, 04 Mar 2021 21:36:03 -0500 Original-Received: by mail-qt1-x82d.google.com with SMTP id v64so660848qtd.5; Thu, 04 Mar 2021 18:36:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KdLsQdCUs8MoLOVvda+5cOzhWTgTGErahJBkxPoKikk=; b=IUfRJ3MRqUYE1fM3unUpW8hAS1+sdGj7jlmUV+iymo/aogjGTjY2B280KYMkOZAaq/ 45LQrioJVJnwsZDqFMeSzrjgRSa7ktcGMFCGrW/MatrkGVqs7KvaIRAWt1RpRxnWphKV B2U5IPhNGU0DkeTtccAMz/UQtD7SPF8ji+0NaMfy9sPNai4cAHDWUTm4oKegwu1ncBor VVCTbwlSuo/sfZ8oGRZjp6s+CfaunMsoPE8xjBv0RM0h1K/T2W0lcjp1BCQ6LTDGuoz+ vnxDIrEt1skEpKdlif154UEyT/k4Zv7uea20pd+wd2T6bDVTUHwc9W/5/6+nhOIEVoHu bQCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KdLsQdCUs8MoLOVvda+5cOzhWTgTGErahJBkxPoKikk=; b=P03TsHsr59S6aZuTbHf38NdvDC/FQy6UrcJzZ5Fh0dLR/QY2GHnpEBycnjQbhjs83w 5hDDMIojrf48gomZryna0hVE2A1yX61uybvH4d/jPvQGZ6TaqPKI6DDz1oWd3zJKXJJe 4SFL9Xc3nli33mfS/Uypoh6xQcU1y82wiVk+Ipg5Myxyh9XimJv5sevzpU1DdajTp/5E VS1vXQR902Dz7vDYxx2rp6sPfsSzIUAKFr79ItGXg0FInlKR61wQDoNTaVcnyA/e9ynU V00qK7VkAioEHshwWPSH8DEfcDeDM84iOOVRlRTTpWcKWfi/468jZvjtvEFm9wrHrLAW /aXQ== X-Gm-Message-State: AOAM533lrsy6WHYMb5xGEmrdf25EfN9g/fTFt8IlFgxkGpKZ6Rq266Hn NudTwqhk08dyuN1l91pDn6oG/KoP8JrbyI70 X-Google-Smtp-Source: ABdhPJznVeub1ZHApQvdFuegPwleKc59WDYrfbj3xmesO5KC5G4n2pf+PR+7vH4V/FPWjFsnNQdCsg== X-Received: by 2002:ac8:ace:: with SMTP id g14mr6801263qti.156.1614911760570; Thu, 04 Mar 2021 18:36:00 -0800 (PST) Original-Received: from localhost.localdomain (dsl-10-132-106.b2b2c.ca. [72.10.132.106]) by smtp.gmail.com with ESMTPSA id a34sm1009349qtc.97.2021.03.04.18.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 18:36:00 -0800 (PST) X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305023524.15317-1-maxim.cournoyer@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 04 Mar 2021 22:01:12 -0500 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20690 Archived-At: From: Ludovic Courtès This bug would cause the test suite to hang and fully use one CPU core and slowly consume all the memory. Signed-off-by: Maxim Cournoyer --- src/md5.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/md5.scm b/src/md5.scm index c30ef2c..48dfa63 100644 --- a/src/md5.scm +++ b/src/md5.scm @@ -68,8 +68,10 @@ referenced C implementation into Scheme. ;; Some math basics. -(define f-add +) -(define f-ash ash) +;; Work around miscompilation on Guile 3 at -O2: +;; . +(define f-add (@ (guile) +)) ;(define f-add +) +(define f-ash (@ (guile) ash)) ;(define f-ash ash) (define (+ . args) (modulo (apply f-add args) #x100000000)) -- 2.30.1