From d7bf3746f76dbeb9ab04b39bf7488aed65951d61 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 4 Oct 2023 13:53:46 +0200 Subject: [PATCH] build: Enable null sanitizer in the browser to avoid null derefs being okay --- main/gui/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/gui/CMakeLists.txt b/main/gui/CMakeLists.txt index b01a84aa4..c718daf57 100644 --- a/main/gui/CMakeLists.txt +++ b/main/gui/CMakeLists.txt @@ -40,6 +40,8 @@ if (EMSCRIPTEN) target_link_options(main PRIVATE -sWASM_BIGINT) target_link_options(main PRIVATE -O1) target_link_options(main PRIVATE -sLEGACY_GL_EMULATION) + target_link_options(main PRIVATE -fsanitize=null) + target_link_options(main PRIVATE -fsanitize-minimal-runtime) target_link_libraries(main PRIVATE idbfs.js) endif ()