@@ -301,6 +301,12 @@ hashMapResize(Thread* t, object map, uint32_t (*hash)(Thread*, object),
301
301
302
302
newArray = makeArray (t, newLength, true );
303
303
304
+ if (oldArray != hashMapArray (t, map)) {
305
+ // a resize was performed during a GC via the makeArray call
306
+ // above; nothing left to do
307
+ return ;
308
+ }
309
+
304
310
if (oldArray) {
305
311
bool weak = objectClass (t, map)
306
312
== arrayBody (t, t->m ->types , Machine::WeakHashMapType);
@@ -320,7 +326,6 @@ hashMapResize(Thread* t, object map, uint32_t (*hash)(Thread*, object),
320
326
321
327
unsigned index = hash (t, k) & (newLength - 1 );
322
328
323
- expect (t, p != arrayBody (t, newArray, index ));
324
329
set (t, p, TripleThird, arrayBody (t, newArray, index ));
325
330
set (t, newArray, ArrayBody + (index * BytesPerWord), p);
326
331
}
@@ -387,7 +392,6 @@ object
387
392
hashMapRemoveNode (Thread* t, object map, unsigned index, object p, object n)
388
393
{
389
394
if (p) {
390
- expect (t, p != tripleThird (t, n));
391
395
set (t, p, TripleThird, tripleThird (t, n));
392
396
} else {
393
397
set (t, hashMapArray (t, map), ArrayBody + (index * BytesPerWord),
0 commit comments