Closed
Bug 1243815
Opened 7 years ago
Closed 7 years ago
Baldr: Put hard limits to the number of sigs/args/imports etc.
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: bbouvier, Assigned: bbouvier)
Details
Attachments
(1 file)
7.74 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•7 years ago
|
||
I checked DeadTrigger2, maximum number of arguments per function is 17, so 128 should be enough for everybody.
Attachment #8713301 -
Flags: review?(luke)
![]() |
||
Comment 2•7 years ago
|
||
Comment on attachment 8713301 [details] [diff] [review] hardlimits.patch Review of attachment 8713301 [details] [diff] [review]: ----------------------------------------------------------------- Nice, thanks! ::: js/src/asmjs/AsmJS.cpp @@ -1674,5 @@ > return sigMap_.add(p, &mg_.sig(*sigIndex), *sigIndex); > } > > - // ModuleGeneratorData limits: > - static const unsigned MaxSigs = 4 * 1024; Good idea sharing these limits! ::: js/src/asmjs/Wasm.cpp @@ +393,5 @@ > if (!d.readVarU32(&numDecls)) > return Fail(cx, d, "expected number of declarations"); > > + if (numDecls > MaxFuncs) > + return Fail(cx, d, "too many function declarations"); Let's just say "too many functions" (since num-decls = num-funcs). ::: js/src/asmjs/WasmBinary.h @@ +32,5 @@ > +static const unsigned MaxSigs = 4 * 1024; > +static const unsigned MaxFuncs = 512 * 1024; > +static const unsigned MaxImports = 4 * 1024; > +static const unsigned MaxExports = 4 * 1024; > +static const unsigned MaxArgsPerFunc = 128; I can imagine weird generated cases arising from codegen where the number of args could be quite a lot. How about we bump this to 4k as well?
Attachment #8713301 -
Flags: review?(luke) → review+
Comment 4•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9e8f89a81569
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•