Closed Bug 1212469 Opened 9 years ago Closed 9 years ago

Make oomTest() a shell function to help the fuzzers

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

As requested, this is preferable since otherwise you need to load a library to get this function.
Assignee: nobody → jcoppeard
Attached patch bug1212469-shell-oomTest (obsolete) (deleted) — Splinter Review
Patch to implement this.

This shows up some more failures on armsim builds which I'm investigating.
Attached patch bug1212469-shell-oomTest v2 (deleted) — Splinter Review
Patch to reimplement oomTest() as a shell function.  It should be more deterministic like this too.
Attachment #8671823 - Attachment is obsolete: true
Attachment #8671924 - Flags: review?(nicolas.b.pierron)
Attached patch ion-fixes-for-shell-oomTest (deleted) — Splinter Review
Patch to fix a couple of issues that started showing up with the previous patch.

The first is that compilerOutputs vector in the TypeZone can end up with containing a script that we failed to link if we get an OOM after FinishCompilation() in LazyLink().  This causes an assert on subsequent calls to LazyLink() for the same script.

The second is that IonCompile() could leave a script's ionScript set to ION_COMPILING_SCRIPT if StartOffThreadIonCompile() failed.
Attachment #8671927 - Flags: review?(jdemooij)
Comment on attachment 8671927 [details] [diff] [review]
ion-fixes-for-shell-oomTest

Review of attachment 8671927 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit/Ion.cpp
@@ -2207,5 @@
>  
>      // If possible, compile the script off thread.
>      if (options.offThreadCompilationAvailable()) {
> -        if (!recompile)
> -            builderScript->setIonScript(cx, ION_COMPILING_SCRIPT);

Hannes fixed this one in another bug so it may already be on inbound when this lands.
Attachment #8671927 - Flags: review?(jdemooij) → review+
Comment on attachment 8671924 [details] [diff] [review]
bug1212469-shell-oomTest v2

Review of attachment 8671924 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/builtin/TestingFunctions.cpp
@@ +56,5 @@
>  static bool
> +EnvVarIsDefined(const char* name)
> +{
> +    const char* value = getenv(name);
> +    return value && value[0] != '0';

nit: && !*value
Attachment #8671924 - Flags: review?(nicolas.b.pierron) → review+
https://hg.mozilla.org/mozilla-central/rev/9c365490d4ce
https://hg.mozilla.org/mozilla-central/rev/46cd97a3b2e6
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
No longer depends on: 1218900
No longer depends on: 1219044
No longer depends on: 1219128
No longer depends on: 1219954
No longer depends on: 1221747
No longer depends on: 1226896
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: