We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 314b906 commit 7c837b8Copy full SHA for 7c837b8
src/rt/rust_task.cpp
@@ -423,6 +423,8 @@ rust_task::link_gc(gc_alloc *gcm) {
423
gcm->prev = NULL;
424
gcm->next = gc_alloc_chain;
425
gc_alloc_chain = gcm;
426
+ if (gcm->next)
427
+ gcm->next->prev = gcm;
428
}
429
430
void
@@ -431,6 +433,8 @@ rust_task::unlink_gc(gc_alloc *gcm) {
431
433
gcm->prev->next = gcm->next;
432
434
if (gcm->next)
435
gcm->next->prev = gcm->prev;
436
+ if (gc_alloc_chain == gcm)
437
+ gc_alloc_chain = gcm->next;
438
439
gcm->next = NULL;
440
0 commit comments