help
help copied to clipboard
nodejs12: static assert fails on PPC: thread_local_top_ = 100 instead of 24 * pointer size
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: https://github.com/nodejs/node/issues/30323#issuecomment-1238701567 (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.
Log for the reference: nodejs12ppc_fail.log
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.
If anyone could help with some advice, it will be great. The issue is still relevant with the current version of NodeJS.
CC @nodejs/v8
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.
Thanks! I'll add the label back.