Skip to content

last_error can not be found in scope for Android target #3509

@barhaterahul

Description

@barhaterahul

When LibAFL is compiled for Android target last_error can not be found in the scope

$ cargo ndk -t arm64-v8a build --release
......
......
error[E0425]: cannot find value `last_error` in this scope
   --> /private/tmp/LibAFL/crates/libafl_frida/src/asan/asan_rt.rs:168:26
    |
168 |         LastErrorGuard { last_error }
    |                          ^^^^^^^^^^ not found in this scope

error[E0560]: struct `LastErrorGuard` has no field named `last_error`
   --> /private/tmp/LibAFL/crates/libafl_frida/src/asan/asan_rt.rs:168:26
    |
168 |         LastErrorGuard { last_error }
    |                          ^^^^^^^^^^ `LastErrorGuard` does not have this field
    |
    = note: all struct fields are already assigned

error: unused variable: `process`
   --> /private/tmp/LibAFL/crates/libafl_frida/src/asan/asan_rt.rs:624:13
    |
624 |         let process = Process::obtain(gum);
    |             ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_process`
    |
    = note: `-D unused-variables` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_variables)]`

Some errors have detailed explanations: E0425, E0560.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `libafl_frida` (lib) due to 3 previous errors

Also process does not fit for Android attribute macro, and it is recognised as unused.
I could not find any way to quickly use errno for Android.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions