Open Bug 1911882 Opened 8 months ago Updated 2 months ago

WasmIonCompile.cpp:6935:21 gives gcc error in no-jit configuration

Categories

(Core :: JavaScript: WebAssembly, defect, P3)

defect

Tracking

()

ASSIGNED

People

(Reporter: debadree333, Assigned: rhunt)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Steps to reproduce:

Observed in https://treeherder.mozilla.org/jobs?repo=try&revision=1c47177c36571da98f8f0ec216984995b3af9d3d

Actual results:

We get the error:

/builds/worker/checkouts/gecko/js/src/wasm/WasmIonCompile.cpp: In function 'bool EmitMemCopy({anonymous}::FunctionCompiler&)':
/builds/worker/checkouts/gecko/js/src/wasm/WasmIonCompile.cpp:6935:21: error: logical 'and' of mutually exclusive tests is always false [-Werror=logical-op]
     if (length != 0 && length <= MaxInlineMemoryCopyLength) {
         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected results:

Should compile

The error happens if no codegen is enabled, which results in MaxInlineMemoryCopyLength being 0, that makes the condition always-false.

https://searchfox.org/mozilla-central/rev/8b0666aff1197e1dd8017de366343de9c21ee437/js/src/wasm/WasmCodegenConstants.h#43,46,49-50,52

#if defined(JS_CODEGEN_X64) || defined(JS_CODEGEN_ARM64)
...
#elif defined(JS_CODEGEN_X86)
...
#else
static const uint32_t MaxInlineMemoryCopyLength = 0;
...
#endif
``

https://searchfox.org/mozilla-central/rev/8b0666aff1197e1dd8017de366343de9c21ee437/js/src/wasm/WasmIonCompile.cpp#6935
```cpp
if (length != 0 && length <= MaxInlineMemoryCopyLength) {
Severity: -- → S4
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → JavaScript: WebAssembly
Ever confirmed: true
Priority: -- → P3
Assignee: nobody → rhunt
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: