[macOS] riscv64, mips64 and loong64 simulators fail to build
Categories
(Core :: JavaScript Engine: JIT, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox140 | --- | fixed |
People
(Reporter: chenx97, Assigned: chenx97)
References
Details
Attachments
(1 external file)
Steps to reproduce:
Build with a simulator-building mozconfig, e.g.:
ac_add_options --enable-project=js
ac_add_options --enable-simulator=loong64
ac_add_options --disable-wasm-jspi
ac_add_options --enable-debug
Then try to build mips64 and riscv64 simulators.
Actual results:
Lots of errors come from mixing intptr_t and int64_t as they are defined differently on macOS.
error: format specifies type 'unsigned long *' but the argument has type 'uint64_t *' (aka 'unsigned long long ') [-Werror,-Wformat]
0:59.70 807 | return sscanf(desc + 2, "%lx", reinterpret_cast<uint64_t>(value)) == 1;
0:59.70 | ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0:59.71 | %llx
Expected results:
These errors shouldn't exist.
error: format specifies type 'unsigned long *' but the argument has type 'uint64_t *' (aka 'unsigned long long *') [-Werror,-Wformat]
0:59.70 807 | return sscanf(desc + 2, "%lx", reinterpret_cast<uint64_t*>(value)) == 1;
0:59.70 | ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0:59.71 | %llx
On macOS, int64_t is long long while intptr_t is long. Many of the
simulators have only been tested on Linux, so the mixed use of both
types haven't been caught. This problem also affects format strings
as the underlying types of int64_t changes, so macros like PRIx64
have to be used here instead.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•