~ chicken-core (chicken-5) d8c325760b080895a03aefb45d675e6722a768a3


commit d8c325760b080895a03aefb45d675e6722a768a3
Author:     Felix Winkelmann <felix@call-with-current-continuation.org>
AuthorDate: Wed Mar 20 11:16:49 2013 -0400
Commit:     Felix Winkelmann <felix@call-with-current-continuation.org>
CommitDate: Wed Mar 20 11:16:49 2013 -0400

    use unsigned key for computing weak table entry in symbol-GC, which fixes a segfault on OpenBSD (thanks to Christian Kellermann)

diff --git a/runtime.c b/runtime.c
index 61b4abae..099dbdc9 100644
--- a/runtime.c
+++ b/runtime.c
@@ -3619,9 +3619,10 @@ C_regparm void C_fcall update_locative_table(int mode)
 
 C_regparm WEAK_TABLE_ENTRY *C_fcall lookup_weak_table_entry(C_word item, C_word container)
 {
-  int key = (C_uword)item >> 2,
-      disp = 0,
-      n;
+  C_uword
+    key = (C_uword)item >> 2,
+    disp = 0,
+    n;
   WEAK_TABLE_ENTRY *wep;
 
   for(n = 0; n < WEAK_HASH_ITERATIONS; ++n) {
Trap