nagisa / rust_libloading

Bindings around the platform's dynamic library loading primitives with greatly improved memory safety.

Home Page:https://docs.rs/libloading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does this library support cargo-fuzz?

surechen opened this issue · comments

I tried to use this lib in my project. But when I use cargo-fuzz, the following errors were reported:

thread '' panicked at 'called Result::unwrap() on an Err value: DlOpen { desc: "/usr/local/src/rust/s/xxx/xxx/fuzz/target/x86_64-unknown-linux-gnu/release/deps/libxxx.so: undefined symbol: __asan_report_load8" }'

The error code is here :

let default_so: &'static str = "libxxxtttt.so";
    INIT.call_once(|| unsafe {
        *ENGINE.borrow_mut() = Some(Mutex::new(Library::new(default_so).unwrap()));
    });

Can anyone tell me how to solve this problem? Thank you very much

This is not a problem with libloading – you must make sure the relevant instrumentation is linked in somewhere, either into the application or added as a dependency for your DSO. Where it would make to do so depends on how your application is structured. So, unfortunately, there isn’t a general solution anybody could provide you.

Closing, since this is a bug tracker for issues with libloading, and not a support forum. You may be better served by asking your question at a venue dedicated for user support, such as https://users.rust-lang.org.

Closing given no further questions have been posed.