Skip to content

Generate atomic array operations in the fuzzer#8545

Open
tlively wants to merge 1 commit intomainfrom
fuzz-array-rmw
Open

Generate atomic array operations in the fuzzer#8545
tlively wants to merge 1 commit intomainfrom
fuzz-array-rmw

Conversation

@tlively
Copy link
Copy Markdown
Member

@tlively tlively commented Mar 30, 2026

Including both atomic get/set operations and RMWs.

Including both atomic get/set operations and RMWs.
@tlively tlively requested a review from a team as a code owner March 30, 2026 18:40
@tlively tlively requested a review from kripken March 30, 2026 18:40
Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm % comment and also I am looking into a StructRMW fuzz bug now, so maybe hold off on landing this for a bit.

edit: filed an issue for that bug, #8548

auto check = makeArrayBoundsCheck(ref, index, funcContext->func, builder);
auto* rmw =
builder.makeArrayRMW(op, check.getRef, check.getIndex, value, order);
auto* fallback = makeTrivial(type);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this trivial? It could be anything?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the same pattern we already use for array.get. I guess it's trivial to reduce the amount of code we generate beyond the requested array operation? Other non-trivial things can already be generated by other means. I'd be happy to update both locations if you think it would be better, though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, right, I guess it's just for the fallback, if the bounds check fails. Something trivial is good enough there.

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.

2 participants