diff options
author | cjihrig <cjihrig@gmail.com> | 2020-04-17 11:24:15 -0400 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2020-05-12 16:13:44 +0200 |
commit | 0d50ba5d482a7d5e3f94df3bbc182813d3fb28e4 (patch) | |
tree | c534194b7e694569e3380920048631e81cdaf9b8 /deps | |
parent | 54ae041309b0f8934b45b4fd73efcfc1bcb1842b (diff) | |
download | node-new-0d50ba5d482a7d5e3f94df3bbc182813d3fb28e4.tar.gz |
deps: fix V8 8.3 on SmartOS
PR-URL: https://github.com/nodejs/node/pull/32831
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/src/base/platform/platform-posix.cc | 4 | ||||
-rw-r--r-- | deps/v8/src/base/platform/platform-solaris.cc | 18 |
2 files changed, 20 insertions, 2 deletions
diff --git a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc index 1e600c7891..54f72e04e6 100644 --- a/deps/v8/src/base/platform/platform-posix.cc +++ b/deps/v8/src/base/platform/platform-posix.cc @@ -970,7 +970,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { // pthread_getattr_np used below is non portable (hence the _np suffix). We // keep this version in POSIX as most Linux-compatible derivatives will // support it. MacOS and FreeBSD are different here. -#if !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) +#if !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(V8_OS_SOLARIS) // static void* Stack::GetStackStart() { @@ -996,7 +996,7 @@ void* Stack::GetStackStart() { return nullptr; } -#endif // !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) +#endif // !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(V8_OS_SOLARIS) // static void* Stack::GetCurrentStackPosition() { return __builtin_frame_address(0); } diff --git a/deps/v8/src/base/platform/platform-solaris.cc b/deps/v8/src/base/platform/platform-solaris.cc index b5b16dac56..b4ac98ce73 100644 --- a/deps/v8/src/base/platform/platform-solaris.cc +++ b/deps/v8/src/base/platform/platform-solaris.cc @@ -65,5 +65,23 @@ void OS::SignalCodeMovingGC() {} void OS::AdjustSchedulingParams() {} +// static +void* Stack::GetStackStart() { + pthread_attr_t attr; + int error; + pthread_attr_init(&attr); + error = pthread_attr_get_np(pthread_self(), &attr); + if (!error) { + void* base; + size_t size; + error = pthread_attr_getstack(&attr, &base, &size); + CHECK(!error); + pthread_attr_destroy(&attr); + return reinterpret_cast<uint8_t*>(base) + size; + } + pthread_attr_destroy(&attr); + return nullptr; +} + } // namespace base } // namespace v8 |