~ chicken-core (chicken-5) 38ca6fd52b7d54c9c2de1698bb984bf7fe3f673f


commit 38ca6fd52b7d54c9c2de1698bb984bf7fe3f673f
Author:     Jim Ursetto <zbigniewsz@gmail.com>
AuthorDate: Thu Jan 12 01:05:01 2012 -0600
Commit:     Christian Kellermann <ckeen@pestilenz.org>
CommitDate: Thu Jan 12 09:12:16 2012 +0100

    Ensure we C_alloc enough stack space in C_string_to_symbol.
    
    Fixes a crash when built with LLVM.  Plain gcc tends to round up.
    
    Signed-off-by: Christian Kellermann <ckeen@pestilenz.org>

diff --git a/runtime.c b/runtime.c
index 3c5f3a93..83da18cd 100644
--- a/runtime.c
+++ b/runtime.c
@@ -7083,7 +7083,7 @@ void allocate_vector_2(void *dummy)
 void C_ccall C_string_to_symbol(C_word c, C_word closure, C_word k, C_word string)
 {
   int len, key;
-  C_word s, *a = C_alloc(6);	/* 6 <=> 1 bucket (pair) + 1 symbol */
+  C_word s, *a = C_alloc(C_SIZEOF_SYMBOL + C_SIZEOF_BUCKET);
   C_char *name;
 
   if(c != 3) C_bad_argc(c, 3);
Trap