[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: Fix cached-module-box cache keys
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/02: Fix cached-module-box cache keys |
Date: |
Mon, 26 Apr 2021 03:50:10 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 976433d667e2502c25f8f6ac8eef04b7d472df6d
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Sun Apr 25 20:27:34 2021 +0200
Fix cached-module-box cache keys
* module/language/cps/reify-primitives.scm (cached-module-box): Include
public? in cache key, so we don't accidentally alias private and
exported names. Also include bound?, to avoid a window in which thread
A resolves and caches var V in preparation for setting it, but thread B
sees V for ref before it was initialized.
---
module/language/cps/reify-primitives.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/language/cps/reify-primitives.scm
b/module/language/cps/reify-primitives.scm
index 494f1ca..710ad6f 100644
--- a/module/language/cps/reify-primitives.scm
+++ b/module/language/cps/reify-primitives.scm
@@ -1,6 +1,6 @@
;;; Continuation-passing style (CPS) intermediate language (IL)
-;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@@ -224,7 +224,7 @@
(define-ephemeral (cached-module-box cps k src param)
(match param
((module name public? bound?)
- (let ((cache-key (cons module name)))
+ (let ((cache-key param))
(with-cps cps
(letv mod cached)
(let$ lookup