~ chicken-core (chicken-5) 55f28987049e8b6be3d7a79401621d428273d172


commit 55f28987049e8b6be3d7a79401621d428273d172
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Fri Jun 30 15:39:45 2017 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Sun Jul 16 14:57:16 2017 +0200

    Initialize symbol table after setting up randomization
    
    Otherwise, the symbol table wouldn't be correctly randomized.
    
    Signed-off-by: felix <felix@call-with-current-continuation.org>

diff --git a/NEWS b/NEWS
index 5db0be65..c5b360ef 100644
--- a/NEWS
+++ b/NEWS
@@ -97,6 +97,9 @@
     buffer overrun and/or segfault (thanks to Lemonboy).
   - CVE-2017-9334: `length' no longer crashes on improper lists (fixes
     #1375, thanks to "megane").
+  - The randomization factor of the symbol table was set before
+    the random seed was set, causing it to have a fixed value on many
+    platforms.
 
 - Core Libraries
   - Unit "posix": If file-lock, file-lock/blocking or file-unlock are
diff --git a/runtime.c b/runtime.c
index 311a1be7..e93026e3 100644
--- a/runtime.c
+++ b/runtime.c
@@ -799,7 +799,6 @@ int CHICKEN_initialize(int heap, int stack, int symbols, void *toplevel)
   C_initial_timer_interrupt_period = INITIAL_TIMER_INTERRUPT_PERIOD;
   C_timer_interrupt_counter = INITIAL_TIMER_INTERRUPT_PERIOD;
   memset(signal_mapping_table, 0, sizeof(int) * NSIG);
-  initialize_symbol_table();
   C_dlerror = "cannot load compiled code dynamically - this is a statically linked executable";
   error_location = C_SCHEME_FALSE;
   C_pre_gc_hook = NULL;
@@ -816,6 +815,7 @@ int CHICKEN_initialize(int heap, int stack, int symbols, void *toplevel)
   callback_continuation_level = 0;
   gc_ms = 0;
   (void)C_randomize(C_fix(time(NULL)));
+  initialize_symbol_table();
 
   if (profiling) {
 #ifndef C_NONUNIX
Trap