Fix a heap corruption bug in ems realloc (#2279)

This commit is contained in:
YAMAMOTO Takashi
2023-06-09 22:36:00 +09:00
committed by GitHub
parent 2f01cb7b7a
commit 4fcc056178
3 changed files with 81 additions and 0 deletions

View File

@ -564,6 +564,7 @@ gc_realloc_vo_internal(void *vheap, void *ptr, gc_size_t size, const char *file,
os_mutex_unlock(&heap->lock);
return NULL;
}
hmu_mark_pinuse(hmu_next);
}
os_mutex_unlock(&heap->lock);
return obj_old;