~ chicken-core (chicken-5) 4685d89bbbb153353be2175387cd74204fc246ec
commit 4685d89bbbb153353be2175387cd74204fc246ec
Author: Jim Ursetto <zbigniewsz@gmail.com>
AuthorDate: Thu Jan 12 01:05:01 2012 -0600
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Fri Jan 13 19:00:38 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: felix <felix@call-with-current-continuation.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