Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodejs12: static assert fails on PPC: thread_local_top_ = 100 instead of 24 * pointer size #3972

Open
barracuda156 opened this issue Sep 7, 2022 · 6 comments
Labels

Comments

@barracuda156
Copy link

barracuda156 commented Sep 7, 2022

Details

In nodejs12 size of ThreadLocalTop is defined as:

constexpr uint32_t kSizeInBytes = 24 * kSystemPointerSize;

Which for 32-bit system means 96. However when building for PPC, I get a bunch of static assert failures due to thread_local_top_ being = 100: nodejs/node#30323 (comment) (yes, I checked that, adding an extra assert on its size explicitly).

For w/e reason, in nodejs16 the same place was changed to:

#ifdef V8_ENABLE_CONSERVATIVE_STACK_SCANNING
  static constexpr uint32_t kSizeInBytes = 25 * kSystemPointerSize;
#else
  static constexpr uint32_t kSizeInBytes = 24 * kSystemPointerSize;
#endif

And then, in current version, it is 26 and 25: https://github.com/nodejs/node/blob/main/deps/v8/src/execution/thread-local-top.h

Should I just change 24 to 25, so that assertion succeeds? Or do I have a bug with how thread_local_top_ is calculated? If the latter is likely, any idea where to look?

P. S. The context of why nodejs12: I am trying to fix it for Macports for MacOS PPC, and there is a branch of nodejs12 supporting ppc32 on AIX/Linux, so it should be feasible and likely easier to make it work. If it does, then I could try a newer version.

Node.js version

12.22.12

Example code

No response

Operating system

MacOS 10.6.8 Server, GCC 12.2.0

Scope

Build

Module and version

Not applicable.

@barracuda156
Copy link
Author

Log for the reference:
nodejs12ppc_fail.log

Copy link

github-actions bot commented May 8, 2024

It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot added the stale label May 8, 2024
@barracuda156
Copy link
Author

If anyone could help with some advice, it will be great. The issue is still relevant with the current version of NodeJS.

@github-actions github-actions bot removed the stale label May 9, 2024
@RedYetiDev RedYetiDev removed the macos label Jun 15, 2024
@RedYetiDev
Copy link
Member

CC @nodejs/v8

@barracuda156
Copy link
Author

CC @nodejs/v8

@RedYetiDev This could be macOS-specific in fact, I am not sure if size of these structures will be the same under ELF ABI.

@RedYetiDev
Copy link
Member

Thanks! I'll add the label back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants