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

Match by Ref fix #2105

Merged
merged 32 commits into from
Apr 27, 2024
Merged

Match by Ref fix #2105

merged 32 commits into from
Apr 27, 2024

Conversation

addisoncrump
Copy link
Collaborator

I could've just opened a PR I guess. Closes #2104.

@tokatoka
Copy link
Member

👍

@addisoncrump
Copy link
Collaborator Author

We need Named for Reference so we can use named metadata.

@addisoncrump addisoncrump marked this pull request as draft April 25, 2024 11:21
.observers_mut()
.match_by_ref_mut(observer_ref)
.unwrap()
executor.observers_mut()[&observer_ref]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👻

Copy link
Member

Choose a reason for hiding this comment

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

Definitely increases the WTF/line 🤣

@addisoncrump addisoncrump marked this pull request as ready for review April 25, 2024 13:57
@addisoncrump
Copy link
Collaborator Author

addisoncrump commented Apr 25, 2024

I would defer the changeover from name to reference to #2068. That is a massive change. Sike, doing it now.

@@ -17,7 +17,7 @@ all-features = true

[features]
python = ["pyo3", "libafl_qemu/python", "pyo3-build-config"]
default = []
default = ["libafl/adaptive_serialization"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

clippy flat out refused to pass if this wasn't enabled. I'm not sure how to get around this.

@addisoncrump
Copy link
Collaborator Author

Just some last fixes in some fuzzers now. I'll circle back to this in the morning 🥱

@addisoncrump
Copy link
Collaborator Author

Okay, supposing the QEMU runnres pass, this is ready to go 📈

@@ -355,6 +355,7 @@ fn fuzz(
let cmpmap = unsafe { OwnedRefMut::from_shmem(&mut cmplog_shmem) };

let cmplog_observer = AFLppCmpLogObserver::new("cmplog", cmpmap, true);
let cmplog_ref = cmplog_observer.type_ref();
Copy link
Member

Choose a reason for hiding this comment

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

Why not .reference?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's more in-line with what we're using now anyways. I'll do a mass find-replace and merge, then.

@domenukk
Copy link
Member

Looks great

@addisoncrump addisoncrump merged commit 28c43b3 into main Apr 27, 2024
103 checks passed
@addisoncrump addisoncrump deleted the match-by-ref-ref branch April 27, 2024 16:08
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.

match_by_ref should accept a &Reference
3 participants