Closed aloisklink closed 1 year ago
Compile edgesec tests with the -fsanitize=address flag which enables AddressSanitizer (aka ASan).
-fsanitize=address
AddressSanitizer (aka ASan) is a memory error detector for C/C++. It finds: Use after free (dangling pointer dereference) Heap buffer overflow Stack buffer overflow Global buffer overflow Use after return Use after scope Initialization order bugs Memory leaks
AddressSanitizer (aka ASan) is a memory error detector for C/C++. It finds:
I've enabled it on on Linux presets by default.
The OpenWRT SDK presets have it disabled, as old versions of GCC have poor support for running Address Sanitizer on non-x86 platforms.
(plus, with the OpenWRT SDK presets, we're not running tests, so compiling with address sanitizer on doesn't really do much)
The following PRs were fixing bugs that address sanitizer caught!
Address sanitizer is supported on FreeBSD, so we could enable it there too. This will probably also help with CheriBSD support, since some of these are probably causing the CheriBSD tests to fail.
Compile edgesec tests with the
-fsanitize=address
flag which enables AddressSanitizer (aka ASan).I've enabled it on on Linux presets by default.
The OpenWRT SDK presets have it disabled, as old versions of GCC have poor support for running Address Sanitizer on non-x86 platforms.
(plus, with the OpenWRT SDK presets, we're not running tests, so compiling with address sanitizer on doesn't really do much)
Bugs caught
The following PRs were fixing bugs that address sanitizer caught!
Future work
Address sanitizer is supported on FreeBSD, so we could enable it there too. This will probably also help with CheriBSD support, since some of these are probably causing the CheriBSD tests to fail.