Newly set prefs via --setpref do not seem to be activated from the command line in the js shell
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox123 | --- | unaffected |
firefox124 | --- | wontfix |
firefox125 | --- | fixed |
People
(Reporter: gkw, Assigned: jandem)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file)
This may not be a bug in the usual sense, but I'm trying to figure out the right way to make use of bug 1877193's improvements.
On m-c rev 3facb0e94116 with debug js shell AR=ar sh ../configure --enable-debug --enable-debug-symbols --with-ccache --enable-nspr-build --enable-ctypes --enable-gczeal --enable-rust-simd --disable-tests
, I run the following:
$ ./js-dbg-64-linux-x86_64-3facb0e94116 --fuzzing-safe --list-prefs
array_grouping=true
arraybuffer_transfer=true
destructuring_fuse=true
experimental.arraybuffer_resizable=false
/snip
The default value of experimental.arraybuffer_resizable
is false
.
I can turn it on with --enable-arraybuffer-resizable
on the same command line.
$ ./js-dbg-64-linux-x86_64-3facb0e94116 --fuzzing-safe --enable-arraybuffer-resizable --list-prefs
array_grouping=true
arraybuffer_transfer=true
destructuring_fuse=true
experimental.arraybuffer_resizable=true
/snip
However, with the new --setpref
way of doing things, I cannot seem to get it to work:
$ ./js-dbg-64-linux-x86_64-3facb0e94116 --fuzzing-safe --setpref=experimental.arraybuffer_resizable=true --list-prefs
array_grouping=true
arraybuffer_transfer=true
destructuring_fuse=true
experimental.arraybuffer_resizable=false
/snip
experimental.arraybuffer_resizable
is false
when I wanted it to be true
. Nor with -P
either:
$ ./js-dbg-64-linux-x86_64-3facb0e94116 --fuzzing-safe -P experimental.arraybuffer_resizable=true --list-prefs
array_grouping=true
arraybuffer_transfer=true
destructuring_fuse=true
experimental.arraybuffer_resizable=false
/snip
I'm aware of bug 1882472 but that seems to involve whether I would put a =
after --setpref
or -P
.
What am I doing wrong? Or is this intended? Or a bug?
Comment 1•1 year ago
|
||
Set release status flags based on info from the regressing bug 1877193
Assignee | ||
Comment 2•1 year ago
|
||
Hm good catch, it's caused by how we handle the pref aliases:
JS::Prefs::setAtStartup_experimental_arraybuffer_resizable(
op.getBoolOption("enable-arraybuffer-resizable"));
This happens after we process the --setpref
options so it overwrites those pref values.
To fix this we could change the ordering, but the better fix might be to not set the pref value if the alias isn't used.
Assignee | ||
Comment 3•1 year ago
|
||
This lets us use --setpref
for prefs with a legacy alias.
It's also more consistent to use the default value from the YAML file if the alias isn't used.
clang-format added some unrelated (Wasm) changes.
Updated•1 year ago
|
Comment 6•1 year ago
|
||
bugherder |
![]() |
Reporter | |
Comment 7•1 year ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #4)
Thanks for reporting this, Gary!
You're welcome! I've now verified this works as expected on m-c rev 76bfcd57b0cd.
More questions ahead:
-
For Jan:
tests.uint32-pref=1
takes a number value instead of true/false, how does the1
value work here? Can we synchronise everything on true/false values? It'll make testing easier as that pref is the only one with a number rather than a boolean. -
I'm going to guess that any pref under the
experimental
section in--list-prefs
is not yet turned on by default on at least nightly builds? And hence not ready for fuzzing to get bug bounties? Or maybe they're valid for bounties, just lower amounts due to them not being on by default yet.
Asking especially wrt. bug bounties, getting :dveditz on as well.
Assignee | ||
Comment 8•1 year ago
|
||
(In reply to Gary Kwong [:gkw] [:nth10sd] (NOT official MoCo now) from comment #7)
- For Jan:
tests.uint32-pref=1
takes a number value instead of true/false, how does the1
value work here? Can we synchronise everything on true/false values? It'll make testing easier as that pref is the only one with a number rather than a boolean.
Most prefs are booleans, but we also have to support numeric prefs. tests.uint32-pref
is a test pref to let us that code - the value can be any uint32 value.
- I'm going to guess that any pref under the
experimental
section in--list-prefs
is not yet turned on by default on at least nightly builds?
This probably depends on the feature, also whether it's ready for fuzzing. Some of them are listed in fuzz-flags.txt I think.
Comment 9•1 year ago
|
||
Asking especially wrt. bug bounties, getting :dveditz on as well.
If they're not finished and stable enough to be turned on in nightly they are default non-eligible
Comment 10•1 year ago
|
||
:jandem is this something you are looking to uplift to 124? if not, please set the status flag to wontfix
![]() |
Reporter | |
Updated•11 months ago
|
Description
•