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

cfg fixup #2154

Merged
merged 15 commits into from
May 8, 2024
Merged

cfg fixup #2154

merged 15 commits into from
May 8, 2024

Conversation

addisoncrump
Copy link
Collaborator

Recently, cfg checking was stabilized. This attempts to resolve the issues in CI associated with this.

@addisoncrump
Copy link
Collaborator Author

@domenukk or @tokatoka : there's a ton of copied code in TCP manager that was never checked because the feature never existed (tcp_debug and tcp_compression). I'm not really sure what needs to be done there.

@rmalmain
Copy link
Collaborator

rmalmain commented May 7, 2024

@addisoncrump it's already done for libafl_qemu btw

@@ -2543,7 +2543,7 @@ where
// Crete a new ShMemProvider for this background thread
let shmem_provider_bg = SP::new().unwrap();

#[cfg(fature = "llmp_debug")]
Copy link
Member

Choose a reason for hiding this comment

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

😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It happens lol, one of the reasons I'm doing this

libafl/Cargo.toml Outdated Show resolved Hide resolved
@@ -26,7 +26,7 @@ use core::{fmt::Debug, time::Duration};
#[cfg(feature = "std")]
use std::time::Instant;

#[cfg(feature = "no_std")]
#[cfg(not(feature = "std"))]
Copy link
Member

Choose a reason for hiding this comment

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

Wait, how did that ever work/not warn or error?

Copy link
Member

@domenukk domenukk left a comment

Choose a reason for hiding this comment

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

This looks great!

@addisoncrump
Copy link
Collaborator Author

Well, hold your horses, it's not over yet 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like this file is getting generated inconsistently; we shouldn't have it in the repo, and instead should just be generated at compile time.

Copy link
Member

Choose a reason for hiding this comment

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

These are the stub bindings, they are only for testing and clippy and so on

Copy link
Member

Choose a reason for hiding this comment

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

(As far as I can tell)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not so sure. @andreafioraldi or @rmalmain: How do we reduce instability here? My bindgen output for this file is inconsistent with y'all's.

@domenukk
Copy link
Member

domenukk commented May 7, 2024

I think the apple thing is broken

@domenukk
Copy link
Member

domenukk commented May 8, 2024

Fixed

@domenukk
Copy link
Member

domenukk commented May 8, 2024

No clue where this is from/ how to fix this:

error[E0432]: unresolved import `crate::FastSnapshotPtr`
  --> libafl_qemu/src/qemu/systemmode.rs:18:26
   |
18 |     EmulatorMemoryChunk, FastSnapshotPtr, GuestAddrKind, MemAccessInfo, Qemu, QemuExitError,
   |                          ^^^^^^^^^^^^^^^ no `FastSnapshotPtr` in the root
   |
note: type alias `crate::emu::systemmode::FastSnapshotPtr` exists but is inaccessible
  --> libafl_qemu/src/emu/systemmode.rs:55:1
   |
55 | pub type FastSnapshotPtr = *mut libafl_qemu_sys::SyxSnapshot;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible

For more information about this error, try `rustc --explain E0432`.
error: could not compile `libafl_qemu` (lib) due to 1 previous error

@domenukk domenukk merged commit 614b149 into main May 8, 2024
102 checks passed
@domenukk domenukk deleted the cfg-fixes branch May 8, 2024 12:31
@domenukk
Copy link
Member

domenukk commented May 8, 2024

Great stuff

@tokatoka tokatoka mentioned this pull request May 16, 2024
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.

4 participants