[Bug 46179] New: Multiple Windows 10 ARM64 apps need ' kernel32.dll.GetCurrentThreadStackLimits' to get stack start address

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Nov 22 14:44:32 CST 2018


https://bugs.winehq.org/show_bug.cgi?id=46179

            Bug ID: 46179
           Summary: Multiple Windows 10 ARM64 apps need
                    'kernel32.dll.GetCurrentThreadStackLimits' to get
                    stack start address
           Product: Wine
           Version: 3.20
          Hardware: aarch64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: kernel32
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

another valuable resource of improving/fixing Wine on ARM64 is the Chrome
browser port to Windows 10 ARM64 platform that is currently underway and going
to continue for some months.

I'm following various Chromium and LLVM/Clang pull requests related to Win10
ARM64 porting activities.

Related PR to this ticket:

https://chromium-review.googlesource.com/c/chromium/src/+/1344870

https://chromium-review.googlesource.com/c/chromium/src/+/1344870/3/third_party/blink/renderer/platform/wtf/stack_util.cc#135

--- snip ---
// On Windows stack limits for the current thread are available in
// the thread information block (TIB). Its fields can be accessed through
// FS segment register on x86 and GS segment register on x86_64.
// On Windows ARM64, stack limits could be retrieved by calling

// GetCurrentThreadStackLimits. This API doesn't work on x86 and x86_64 here

// because it requires Windows 8+.

#if defined(ARCH_CPU_X86_64)
  return reinterpret_cast<void*>(__readgsqword(offsetof(NT_TIB64, StackBase)));
#elif defined(ARCH_CPU_X86)
  return reinterpret_cast<void*>(__readfsdword(offsetof(NT_TIB, StackBase)));

#elif defined(ARCH_CPU_ARM64)

  ULONG_PTR lowLimit, highLimit;

  ::GetCurrentThreadStackLimits(&lowLimit, &highLimit);

  return reinterpret_cast<void*>(highLimit);
#endif
--- snip ---

Microsoft docs:

https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getcurrentthreadstacklimits

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list