Commit 7c9d30f5 authored by Anton Bikineev's avatar Anton Bikineev Committed by Commit Bot

[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: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69476}
parent f7a4c311
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment