Skip to content

Commit 7ff6546

Browse files
committed
deps: V8: cherry-pick 9868b2aefa1a
Original commit message: Fix SmartOS compilation errors This commit resolves compilation errors on SmartOS that were found while upgrading Node.js. See: nodejs#32831 Change-Id: Ia2a2e028ba4f5bfd69c050cab4fb4e13af5eefd9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2191054 Reviewed-by: Michael Lippautz <[email protected]> Reviewed-by: Ulan Degenbaev <[email protected]> Commit-Queue: Ulan Degenbaev <[email protected]> Cr-Commit-Position: refs/heads/master@{#67793} Refs: v8/v8@9868b2a
1 parent 7ff9747 commit 7ff6546

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.7',
39+
'v8_embedder_string': '-node.8',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/base/platform/platform-posix.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,8 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
970970
// pthread_getattr_np used below is non portable (hence the _np suffix). We
971971
// keep this version in POSIX as most Linux-compatible derivatives will
972972
// support it. MacOS and FreeBSD are different here.
973-
#if !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(_AIX)
973+
#if !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(_AIX) && \
974+
!defined(V8_OS_SOLARIS)
974975

975976
// static
976977
void* Stack::GetStackStart() {
@@ -996,7 +997,8 @@ void* Stack::GetStackStart() {
996997
return nullptr;
997998
}
998999

999-
#endif // !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(_AIX)
1000+
#endif // !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) &&
1001+
// !defined(_AIX) && !defined(V8_OS_SOLARIS)
10001002

10011003
// static
10021004
void* Stack::GetCurrentStackPosition() { return __builtin_frame_address(0); }

deps/v8/src/base/platform/platform-solaris.cc

+18
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,23 @@ void OS::SignalCodeMovingGC() {}
6565

6666
void OS::AdjustSchedulingParams() {}
6767

68+
// static
69+
void* Stack::GetStackStart() {
70+
pthread_attr_t attr;
71+
int error;
72+
pthread_attr_init(&attr);
73+
error = pthread_attr_get_np(pthread_self(), &attr);
74+
if (!error) {
75+
void* base;
76+
size_t size;
77+
error = pthread_attr_getstack(&attr, &base, &size);
78+
CHECK(!error);
79+
pthread_attr_destroy(&attr);
80+
return reinterpret_cast<uint8_t*>(base) + size;
81+
}
82+
pthread_attr_destroy(&attr);
83+
return nullptr;
84+
}
85+
6886
} // namespace base
6987
} // namespace v8

0 commit comments

Comments
 (0)