Clarify that wasm memories are 32-bit wasm memories + decouple mem limit from buffer limit
Categories
(Core :: JavaScript: WebAssembly, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
References
Details
Attachments
(1 file)
Preliminary work for larger array buffers. We need to clarify that we currently have only 32-bit wasm memories, so that there's no room for confusion about that. And we also need to decouple wasm's memory limit from the arraybuffer's limit, because a 32-bit memory will have a memory limit that is much lower than the arraybuffer's limit on 64-bit platforms.
Assignee | ||
Comment 1•4 years ago
|
||
This patch does two intertwined things:
-
it clarifies throughout that the wasm memories we are currently
using are 32-bit memories by adding '32' in a number of names and
introducing a MemoryKind enum that is (for now) used to carry the
type of memory we have. -
it stops using the MaxBufferByteLength for anything to do with
memory length checking, instead introducing checks against a limit
derived from MaxMemory32Pages where that is appropriate. All
remaining uses of MaxBufferByteLength are strictly about the
buffer maximum, not the memory's maximum.
Updated•4 years ago
|
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7c2ee39c8744 Decouple memory limit from buffer limit, clarify 32-bit memories. r=rhunt
Comment 3•4 years ago
|
||
Backed out for causing sm build bustages in MacroAssembler-arm64 :
Backout link: https://hg.mozilla.org/integration/autoland/rev/8f0fadc9e78b9d155e833f3b25d940e13cb7fed9
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunning%2Cpending%2Crunnable&revision=7c2ee39c8744463b3075270d4b0e1a922a96591f
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=320096428&repo=autoland&lineNumber=2754
"make[3]: Entering directory '/builds/worker/workspace/obj-spider/mfbt'
[task 2020-10-29T07:15:30.757Z] mkdir -p '.deps/'
[task 2020-10-29T07:15:30.759Z] mfbt/lz4.o
[task 2020-10-29T07:15:30.759Z] /builds/worker/fetches/clang/bin/clang -std=gnu99 -o lz4.o -c -I/builds/worker/workspace/obj-spider/dist/system_wrappers -include /builds/worker/checkouts/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -ftrivial-auto-var-init=pattern -DDEBUG=1 -DIMPL_MFBT -DLZ4LIB_VISIBILITY= -I/builds/worker/checkouts/gecko/mfbt -I/builds/worker/workspace/obj-spider/mfbt -I/builds/worker/checkouts/gecko/mfbt/double-conversion -I/builds/worker/workspace/obj-spider/dist/include -I/builds/worker/workspace/obj-spider/dist/include/nspr -fPIC -include /builds/worker/workspace/obj-spider/js/src/js-confdefs.h -DMOZILLA_CLIENT -Qunused-arguments -ffunction-sections -fdata-sections -fno-math-errno -pthread -pipe -g -O3 -fno-omit-frame-pointer -funwind-tables -Werror -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Werror=implicit-function-declaration -Wno-psabi -fexperimental-new-pass-manager -MD -MP -MF .deps/lz4.o.pp /builds/worker/checkouts/gecko/mfbt/lz4/lz4.c
[task 2020-10-29T07:15:30.759Z] mfbt/lz4frame.o
[task 2020-10-29T07:15:30.810Z] In file included from Unified_cpp_js_src_jit14.cpp:2:
[task 2020-10-29T07:15:30.810Z] /builds/worker/checkouts/gecko/js/src/jit/arm64/MacroAssembler-arm64.cpp:1413:14: error: no member named 'boundsCheckLimit' in 'TlsData'
[task 2020-10-29T07:15:30.810Z] offsetof(wasm::TlsData, boundsCheckLimit));
[task 2020-10-29T07:15:30.810Z] ^ ~~~~~~~~~~~~~~~~
[task 2020-10-29T07:15:30.810Z] /builds/worker/fetches/clang/lib/clang/11.0.0/include/stddef.h:104:24: note: expanded from macro 'offsetof'
[task 2020-10-29T07:15:30.810Z] #define offsetof(t, d) __builtin_offsetof(t, d)
[task 2020-10-29T07:15:30.810Z] ^ ~
[task 2020-10-29T07:15:30.810Z] /builds/worker/workspace/obj-spider/dist/include/mozilla/Assertions.h:414:24: note: expanded from macro 'MOZ_ASSERT'
[task 2020-10-29T07:15:30.810Z] ("MOZ_ASSERT", VA_ARGS))
[task 2020-10-29T07:15:30.810Z] ^~~~~~~~~~~
[task 2020-10-29T07:15:30.810Z] /builds/worker/workspace/obj-spider/dist/include/mozilla/Assertions.h:404:33: note: expanded from macro 'MOZ_ASSERT_GLUE'
[task 2020-10-29T07:15:30.810Z] #define MOZ_ASSERT_GLUE(a, b) a b
[task 2020-10-29T07:15:30.810Z] ^
[task 2020-10-29T07:15:30.810Z] /builds/worker/workspace/obj-spider/dist/include/mozilla/Assertions.h:385:40: note: expanded from macro 'MOZ_ASSERT_HELPER1'
[task 2020-10-29T07:15:30.810Z] MOZ_VALIDATE_ASSERT_CONDITION_TYPE(expr);
[task 2020-10-29T07:15:30.810Z] ^~~~
[task 2020-10-29T07:15:30.810Z] /builds/worker/workspace/obj-spider/dist/include/mozilla/Assertions.h:367:58: note: expanded from macro 'MOZ_VALIDATE_ASSERT_CONDITION_TYPE'
[task 2020-10-29T07:15:30.810Z] mozilla::detail::AssertionConditionType<decltype(x)>::isValid,
[task 2020-10-29T07:15:30.810Z] ^
[task 2020-10-29T07:15:30.810Z] In file included from Unified_cpp_js_src_jit14.cpp:2:
[task 2020-10-29T07:15:30.810Z] /builds/worker/checkouts/gecko/js/src/jit/arm64/MacroAssembler-arm64.cpp:1413:14: error: no member named 'boundsCheckLimit' in 'TlsData'
[task 2020-10-29T07:15:30.810Z] offsetof(wasm::TlsData, boundsCheckLimit));"
Assignee | ||
Comment 4•4 years ago
|
||
Fixed this and did a full try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=26416458bbf150b4f6dbfc228426a960590b9642
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d606ab4b0dc1 Decouple memory limit from buffer limit, clarify 32-bit memories. r=rhunt
Comment 6•4 years ago
|
||
bugherder |
Description
•