From 825a239813375bae3b458bc656274dca809776be Mon Sep 17 00:00:00 2001 From: Caleb Sander Date: Fri, 13 Oct 2023 23:00:48 -0600 Subject: [PATCH] readme: add instructions for enabling UBSAN The undefined behavior sanitizer can catch a bunch of common C bugs. Add instructions to the README for enabling it via meson. Signed-off-by: Caleb Sander --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f785d0c2..e73cadff 100644 --- a/README.md +++ b/README.md @@ -178,3 +178,5 @@ Note that when using the sanitize feature, the library `libasan.so` must be avai ``` meson setup .build -Db_sanitize=address && LD_PRELOAD=/lib64/libasan.so.6 ninja -C .build test ``` + +It's also possible to enable the undefined behavior sanitizer with `-Db_sanitize=undefined`. To enable both, use `-Db_sanitize=address,undefined`. -- 2.50.1