Example project showcasing ASAN for shared libraries
Find a file
2024-10-17 15:10:29 +02:00
.gitignore Add analyze target for static analysis 2024-10-17 15:10:29 +02:00
libhello.c Leaky function with argument 2024-10-17 14:29:10 +02:00
libhello.h Leaky function with argument 2024-10-17 14:29:10 +02:00
main.c Leaky function with argument 2024-10-17 14:29:10 +02:00
Makefile Add analyze target for static analysis 2024-10-17 15:10:29 +02:00
README Initial commit 2024-10-15 17:11:28 +02:00

build:
$ make

force rebuild:
$ make -B

run:
$ make run

ASAN run:
$ make run_asan

clean:
$ make clean

Additional ASAN options:
- detect_leaks=1: Enables leak detection (default on Linux, not available on macOS).
- halt_on_error=0: Continues execution after detecting the first error.
- verbosity=1: Increases the verbosity of ASan output.
- print_stats=1: Prints statistics after execution.
- detect_stack_use_after_return=1: Detects stack-use-after-return bugs.
- check_initialization_order=1: Detects initialization-order bugs.
- quarantine_size_mb=256: Sets the size of quarantine for better detection of use-after-free bugs.
- detect_odr_violation=2: Detects One Definition Rule violations.
- alloc_dealloc_mismatch=1: Detects mismatched allocation-deallocation errors.
- strict_string_checks=1: Enables strict string functions checks.