Hi all,

Fuzzers are testing configurations which are not the default one, such as --ion-gvn=off and --ion-regalloc=backtracking. Some of these options are convenient as we want to be robust or as we want to migrate to a new configuration.

Ideally we should use the testing functions[1], such as "gczeal" or "setJitCompilerOption" as these can also be used in browser builds.

For options which are not covered by testing functions yet and which have a command line interface in the JS Shell, I am adding a way to use these, as part of Bug 1105187 [2]. To use command line options, just write a similar comment at the top of the test case:

> // |jit-test| --no-sse4; --ion-regalloc=backtracking; error:ReferenceError
>
> …

Note that command line options are separated by semi-colons, and that spaces around them are stripped before appending them to the command line of the JS Shell.

Only long command line options (starting with "--") are accepted, and not the short one, so

> // |jit-test| -D

Will not work and output a warning message, while the following will succeed:

> // |jit-test| --dump-bytecode

If you have any doubt, you can check if the JS Shell is invoked with the right command line, by using a similar command:

> python ./jit-test/jit_test.py -s -o ./path/to/js ion/bug1105187-sink.js


[1] http://dxr.mozilla.org/mozilla-central/source/js/src/builtin/TestingFunctions.cpp#2221
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1105187

--
Nicolas B. Pierron
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to