Skip to content

Find calls to panic functions in rust executables

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

philipc/findpanics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

findpanics - Find calls to panic functions in rust executables

Use disassembly and DWARF debugging information to find calls to panic functions. Currently only tested on Linux.

This tool is intended for auditing specific aspects of an executable. You will never avoid most panics in rust code, but avoiding panics in specific locations may be possible.

Installing

After installing Rust, run:

cargo install --git https://github.com/philipc/findpanics

Running

Usage: findpanics <FILE>

The current directory must be the top level of a crate.

A whitelist of allowed panics is read from findpanics.yaml in the current directory. Currently this whitelist must be created manually.

Example output

In function 45800 findpanics::main::ha119f0252f22d91f

    Call to 1bfe50 core::panicking::panic::hdf4baf73e8b6719e
         at 45acd core::option::{{impl}}::unwrap<&str> (/checkout/src/libcore/macros.rs:20)
         inlined at findpanics::main (src/main.rs:61)
            source: let path = matches.value_of(OPT_FILE).unwrap();

License

This software is licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Find calls to panic functions in rust executables

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages