[base] Don't destroy pthread_attr if it failed to be created
The issue popped up while implementing conservative stack scanning in V8. Bug: v8:10614 Change-Id: I7edc6ca1f248f45b10be0fa45e28a98fd2b03840 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2362651 Auto-Submit: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69476}
This commit is contained in:
parent
f7a4c31172
commit
7c9d30f55e
@ -1009,7 +1009,6 @@ void* Stack::GetStackStart() {
|
||||
pthread_attr_destroy(&attr);
|
||||
return reinterpret_cast<uint8_t*>(base) + size;
|
||||
}
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
#if defined(V8_LIBC_GLIBC)
|
||||
// pthread_getattr_np can fail for the main thread. In this case
|
||||
|
Loading…
Reference in New Issue
Block a user