Closed Bug 1700900 Opened 4 years ago Closed 4 years ago

js shell: improve propagation of wasm-specific command line arguments to child processes

Categories

(Core :: JavaScript: WebAssembly, defect)

defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: jseward, Assigned: jseward)

References

Details

Attachments

(1 file, 2 obsolete files)

In some circumstances, the JS shell may create a child process to perform wasm
compilation. It can happen that the child process chooses a different
compiler than the parent, and/or possibly that the child allows different wasm
extensions than the parent. This happens because command line arguments that
select such compilers or extensions are not propagated to the child, when they
should be.

On aarch64-linux, a debug build of the shell will fail with

Assertion failure: wasm::CodeCachingAvailable(cx), at js/src/shell/js.cpp:6762

given

../src/jit-test/jit_test.py \
   --args="--wasm-compiler=ion" -f -t 60 ./dist/bin/js wasm/caching.js

due to --wasm-compiler=ion not being propagated to the child.

In some circumstances, the JS shell may create a child process to perform wasm
compilation. It can happen that the child process chooses a different
compiler than the parent, and/or possibly that the child allows different wasm
extensions than the parent. This happens because command line arguments that
select such compilers or extensions are not propagated to the child, when they
should be. This has been observed to lead to an assertion failure.

This patch ensures propagation of the following flags:

  --wasm-gc
  --wasm-simd-wormhole
  --wasm-exceptions
  --wasm-function-references
  --no-wasm-simd
  --no-wasm-reftypes
  --no-wasm-multi-value
  --test-wasm-await-tier2
  --wasm-force-ion

--disable-wasm-huge-memory is already propagated.

It also moves propagation of the following down, so that all of the flag
propagation logic is together, at the end of main().

  --no-sse3
  --no-ssse3
  --no-sse41
  --no-sse42
  --enable-avx
Assignee: nobody → jseward
Status: NEW → ASSIGNED
Blocks: 1700948

In some circumstances, the JS shell may create a child process to perform wasm
compilation. It can happen that the child process chooses a different
compiler than the parent, and/or possibly that the child allows different wasm
extensions than the parent. This happens because command line arguments that
select such compilers or extensions are not propagated to the child, when they
should be. This has been observed to lead to an assertion failure.

This patch ensures propagation of the following flags:

  --wasm-gc
  --wasm-simd-wormhole
  --wasm-exceptions
  --wasm-function-references
  --no-wasm-simd
  --no-wasm-reftypes
  --no-wasm-multi-value
  --test-wasm-await-tier2
  --wasm-force-ion

--disable-wasm-huge-memory is already propagated.

It also moves propagation of the following down, so that all of the flag
propagation logic is together, at the end of main().

  --no-sse3
  --no-ssse3
  --no-sse41
  --no-sse42
  --enable-avx
Attachment #9211470 - Attachment is obsolete: true

In some circumstances, the JS shell may create a child process to perform wasm
compilation. It can happen that the child process chooses a different
compiler than the parent, and/or possibly that the child allows different wasm
extensions than the parent. This happens because command line arguments that
select such compilers or extensions are not propagated to the child, when they
should be. This has been observed to lead to an assertion failure.

This patch ensures propagation of the following flags:

  --wasm-gc
  --wasm-simd-wormhole
  --wasm-exceptions
  --wasm-function-references
  --no-wasm-simd
  --no-wasm-reftypes
  --no-wasm-multi-value
  --test-wasm-await-tier2
  --wasm-force-ion

--disable-wasm-huge-memory is already propagated.

It also moves propagation of the following down, so that all of the flag
propagation logic is together, at the end of main().

  --no-sse3
  --no-ssse3
  --no-sse41
  --no-sse42
  --enable-avx
Pushed by jseward@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4bf8856cbe56 js shell: improve propagation of wasm-specific command line arguments to child processes. r=lth.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Attachment #9211700 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: