-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Add support for Unicorn engine #1054
Conversation
Hey Henri, I will adapt the code in the following days/weeks, I'm quite busy now |
What to do with this? @andreafioraldi ? |
@andreafioraldi @henri2h what do we do with this PR? Update & merge, or close? |
we can merge with proper ci |
The API changed a lot, it can be closed as it shows a use case in using
unicorn so people interested can still look at it and borrow code. Maybe we
can close it and pin somewhere?
…On Wed 12 Feb 2025 at 19:58, tokatoka ***@***.***> wrote:
we can merge with proper ci
—
Reply to this email directly, view it on GitHub
<#1054 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3LJ6WZHUKN4VJIPH5SE332POKURAVCNFSM6AAAAABW7XBX6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJUGU4DSNRUGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I mean the other option is, if @henri2h wants, to update this PR and merge |
a842044
to
d31c3b9
Compare
Except for the code itself.
For CI; |
Also here you should add
|
// Setting up the edge coverage tracker | ||
let mut shmem_provider = unix_shmem::UnixShMemProvider::new().unwrap(); | ||
|
||
let mut shmem = shmem_provider.new_shmem(EDGES_MAP_DEFAULT_SIZE).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need shared maps to interact with unicorn at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like, just return Err from unicorn, return ExitKind::Crash from the harness, reload the unicorn state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, it was to be able to use the InProcessForExecutor
to be able to restore the memory context at each execution but here it's not needed. Using the unicorn reset function (doesn't reset the memory) is enough.
19af1b6
to
40aadec
Compare
Cool stuff! |
let cs = match emu.get_arch() { | ||
Arch::ARM => Capstone::new() | ||
.arm() | ||
.mode(arch::arm::ArchMode::Thumb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is technically only correct for a subset of targets
After running ./scripts/clippy.sh there's some warnings from your crate |
Add support for unicorn engine for CPU emulation
Currently support
Supersede: henri2h#1