From eb85a1fb75fb0b157a8e7b46e2caa4da3ad49d92 Mon Sep 17 00:00:00 2001 From: Ian Piumarta Date: Wed, 22 Mar 2023 16:06:38 +0900 Subject: [PATCH] Compare symbols by their name not by their address to prevent non-determinism. --- src/object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/object.c b/src/object.c index 7bd448c..4941585 100644 --- a/src/object.c +++ b/src/object.c @@ -427,6 +427,8 @@ int oopcmp(oop a, oop b) } case String: return strcmp(get(a, String, value), get(b, String, value)); + case Symbol: + return strcmp(get(a, Symbol, name), get(b, Symbol, name)); default: { intptr_t l= (intptr_t)a, r= (intptr_t)b; if (l < r) return -1;