8346569: Shenandoah: Worker initializes ShenandoahThreadLocalData twice results in memory leak

Reviewed-by: wkemper, shade
This commit is contained in:
Zhengyu Gu 2025-01-06 13:44:35 +00:00
parent f1d85ab3e6
commit dfaa89162a

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2017, 2021, Red Hat, Inc. All rights reserved. * Copyright (c) 2017, 2021, Red Hat, Inc. All rights reserved.
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -73,7 +74,6 @@ ShenandoahPushWorkerScope::~ShenandoahPushWorkerScope() {
} }
void ShenandoahWorkerThreads::on_create_worker(WorkerThread* worker) { void ShenandoahWorkerThreads::on_create_worker(WorkerThread* worker) {
ShenandoahThreadLocalData::create(worker);
if (_initialize_gclab) { if (_initialize_gclab) {
ShenandoahThreadLocalData::initialize_gclab(worker); ShenandoahThreadLocalData::initialize_gclab(worker);
} }