-
Notifications
You must be signed in to change notification settings - Fork 224
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
Implement rust TemporaryFile #5430
base: dev
Are you sure you want to change the base?
Conversation
major: info_raw.major, | ||
minor: info_raw.minor, | ||
build: info_raw.build, | ||
channel: unsafe { string::BnString::from_raw(info_raw.channel) }, |
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 will crash on local builds of binary ninja due to a bug (unrelated to this PR) for any other reviewers. I don't think this should block as the fix is in the core.
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.
Fix is in latest dev for the crash so no cause for alarm anymore :)
let data = DataBuffer::new(DATA).unwrap(); | ||
let tmp_file = TemporaryFile::new_from_contents(&data).unwrap(); | ||
let data_read = tmp_file.contents(); | ||
assert_eq!(data_read.get_data(), DATA); |
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.
I cannot get this to work under headless:
assertion `left == right` failed
left: []
right: [116, 101, 115, 116, 32, 49, 50, 51]
Other than the comments I left LGTM If temporary files do not work under headless (???) then they will IMO have to be omitted until that is resolved. |
85a26f2
to
7fef169
Compare
pub fn is_shutdown_requested() { | ||
unsafe { binaryninjacore_sys::BNIsShutdownRequested() }; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
I'm slowly implementing functions from the Core API that are missing on the rust API.