Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalability introspector + State refactor #1674

Merged
merged 35 commits into from
Nov 21, 2023
Merged

Conversation

tokatoka
Copy link
Member

No description provided.

@tokatoka tokatoka changed the title Scalability introspector Scalability introspector + State refactor Nov 20, 2023
@@ -113,7 +113,7 @@ impl LibfuzzerCrashCauseFeedback {

impl<S> Feedback<S> for LibfuzzerCrashCauseFeedback
where
S: UsesInput<Input = BytesInput> + HasClientPerfMonitor,
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand why this code compiles...?
@addisoncrump

Essentially we changed UsesInput to State.
But in UsesInput you can force(?) its Input to be BytesInput.
Now we're using State but it doesn't know anything about Input type.
Why this works????

Copy link
Collaborator

Choose a reason for hiding this comment

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

State<Input = BytesInput>

Copy link
Member Author

@tokatoka tokatoka Nov 20, 2023

Choose a reason for hiding this comment

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

ok. it just compiles..
but why syntax like this works?

State<Input = BytesInput>

Shouldn't this Input be a associate type of State?
but the trait State is this:

pub trait State:
    UsesInput + Serialize + DeserializeOwned + MaybeHasClientPerfMonitor + MaybeHasScalabilityMonitor
{
}

And there's no such thing like Input in this State definition

Copy link
Member Author

Choose a reason for hiding this comment

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

My question is what is this Input for the State

@@ -82,10 +82,7 @@ impl<'a, S> Named for NautilusFeedback<'a, S> {

impl<'a, S> Feedback<S> for NautilusFeedback<'a, S>
where
S: HasMetadata
Copy link
Member Author

Choose a reason for hiding this comment

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

Same pattern is in here..?

Would this be a problem?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This one is fine -- anywhere you see <Input = ...> automatically gets flattened out to UsesInput's Input.

@tokatoka tokatoka merged commit 379e2ae into main Nov 21, 2023
17 checks passed
@tokatoka tokatoka deleted the scalability_introspector branch November 21, 2023 13:38
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