mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-18 03:43:15 +00:00
8333361: ubsan,test : libHeapMonitorTest.cpp:518:9: runtime error: null pointer passed as argument 2, which is declared to never be null
Reviewed-by: asteiner, lucy, amenkov
This commit is contained in:
parent
bdd96604ae
commit
ed149062d0
@ -515,7 +515,9 @@ static void event_storage_augment_storage(EventStorage* storage) {
|
||||
ObjectTrace** new_objects = reinterpret_cast<ObjectTrace**>(malloc(new_max * sizeof(*new_objects)));
|
||||
|
||||
int current_count = storage->live_object_count;
|
||||
memcpy(new_objects, storage->live_objects, current_count * sizeof(*new_objects));
|
||||
if (storage->live_objects != nullptr) {
|
||||
memcpy(new_objects, storage->live_objects, current_count * sizeof(*new_objects));
|
||||
}
|
||||
free(storage->live_objects);
|
||||
storage->live_objects = new_objects;
|
||||
storage->live_object_size = new_max;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user