This commit is contained in:
rosenkolev1 2026-03-31 13:48:23 +05:00 committed by GitHub
commit 2ab3e9ca34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,7 @@ void TcbDtor(Core::Tcb* oldtls) {
ASSERT_MSG(num_dtvs <= max_tls_index, "Out of bounds DTV access");
const u32 static_tls_size = linker->StaticTlsSize();
const u8* tls_base = (const u8*)oldtls - static_tls_size;
u8* tls_base = (u8*)oldtls - static_tls_size;
for (int i = 1; i < num_dtvs; i++) {
u8* dtv_ptr = dtv_table[i + 1].pointer;
@ -76,8 +76,9 @@ void TcbDtor(Core::Tcb* oldtls) {
linker->FreeTlsForNonPrimaryThread(dtv_ptr);
}
}
delete[] dtv_table;
linker->FreeTlsForNonPrimaryThread(tls_base);
}
struct TlsIndex {