--- v8/src/base/platform/platform-openbsd.cc.orig 2022-02-07 13:39:41 UTC +++ v8/src/base/platform/platform-openbsd.cc @@ -6,6 +6,7 @@ // POSIX-compatible parts, the implementation is in platform-posix.cc. #include +#include #include #include #include @@ -121,6 +122,17 @@ void OS::SignalCodeMovingGC() { } void OS::AdjustSchedulingParams() {} + +// static +Stack::StackSlot Stack::GetStackStart() { + stack_t ss; + void *base; + if (pthread_stackseg_np(pthread_self(), &ss) != 0) + return nullptr; + + base = (void*)((size_t) ss.ss_sp - ss.ss_size); + return reinterpret_cast(base) + ss.ss_size; +} std::vector OS::GetFreeMemoryRangesWithin( OS::Address boundary_start, OS::Address boundary_end, size_t minimum_size,