Skip to content

[Fuzzing] Fix feature checks in get_random_opts - #9303

Open
tlively wants to merge 1 commit into
mainfrom
fuzzer-flatten-opts
Open

tlively wants to merge 1 commit into
mainfrom
fuzzer-flatten-opts

Conversation

@tlively

@tlively tlively commented Oct 24, 2026

Copy link
Copy Markdown
Member

In test_one(), get_random_opts() was called before update_feature_opts('a.wasm') converted FEATURE_OPTS from '--all-features --disable-' into explicit '--enable-' flags, so get_random_opts() never saw the active '--enable-*' flags when selecting passes for test_one(). In addition, get_random_opts() checked "'--gc' not in FEATURE_OPTS" instead of "'--enable-gc' in FEATURE_OPTS", which was always true and caused '--flatten', '-O4', '--rereloop', and '--dfo' to be skipped on every call. Move get_random_opts() after update_feature_opts('a.wasm') and check for '--enable-gc' in FEATURE_OPTS.

In test_one(), get_random_opts() was called before update_feature_opts('a.wasm') converted FEATURE_OPTS from '--all-features --disable-*' into explicit '--enable-*' flags, so get_random_opts() never saw the active '--enable-*' flags when selecting passes for test_one(). In addition, get_random_opts() checked "'--gc' not in FEATURE_OPTS" instead of "'--enable-gc' in FEATURE_OPTS", which was always true and caused '--flatten', '-O4', '--rereloop', and '--dfo' to be skipped on every call. Move get_random_opts() after update_feature_opts('a.wasm') and check for '--enable-gc' in FEATURE_OPTS.
@tlively
tlively requested a review from a team as a code owner October 24, 2026 02:00
@tlively
tlively requested review from stevenfontanella and removed request for a team October 24, 2026 02:00

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates scripts/fuzz_opt.py by delaying the generation of randomized options (get_random_opts()) until after update_feature_opts('a.wasm') is called. Additionally, it corrects a condition in get_random_opts() to avoid the --flatten option when --enable-gc is present in FEATURE_OPTS, replacing the previous check for the absence of --gc. There are no review comments, and I have no feedback to provide.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant