[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH devel 2/6] Work around Guile 3.0.0 miscompilation at -O2.
From: |
Maxim Cournoyer |
Subject: |
[PATCH devel 2/6] Work around Guile 3.0.0 miscompilation at -O2. |
Date: |
Thu, 4 Mar 2021 21:35:20 -0500 |
From: Ludovic Courtès <ludo@gnu.org>
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 <maxim.cournoyer@gmail.com>
---
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:
+;; <https://bugs.gnu.org/39251>.
+(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