Closed Bug 1894671 Opened 1 year ago Closed 1 year ago

Ignore unknown shell flags in fuzzing mode

Categories

(Core :: JavaScript Engine, task)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(4 files)

Some fuzzers have their own list of shell flags and if we remove a shell flag without notifying the fuzzers, it breaks fuzzing.

To work around this, we could change the shell's option parsing so that if --fuzzing-safe is used, we print a warning for unknown shell flags that follow it, instead of aborting execution.

It's a hack that has some risks, but decoder thinks it's worth doing and an improvement over the current situation. This also makes it easier for us to remove shell flags immediately instead of keeping them as no-ops to not break fuzzing.

When --fuzzing-safe is used, we now print a warning for unknown shell flags that
follow it and ignore them, instead of exiting the shell. This avoids breaking fuzzing
when we remove a shell flag.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED

Jason, just a heads-up, this changes how the JS shell behaves with invalid flags. I believe this should also rather be an improvement for bugmon (e.g. when retesting a bug that required specific flags but these flags were removed meanwhile), but flagging this in case there is some logic in bugmon that requires this to error on an invalid flag.

The new test was failing intermittently because set is non-deterministic and
was changing the order of the flags.

Change the code to use dict.fromkeys from https://stackoverflow.com/q/480214

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/561dadf77c60 Preserve shell flag order in jit-test harness. r=jonco https://hg.mozilla.org/integration/autoland/rev/ddc4a80ed92f Print a warning for unknown shell flags if --fuzzing-safe is used. r=jonco https://hg.mozilla.org/integration/autoland/rev/4f168f85ad38 Remove some no-op shell flags. r=jonco https://hg.mozilla.org/integration/autoland/rev/31f22e8b1dba Treat unknown pref names the same way as unknown shell flags with --fuzzing-safe. r=jonco
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: