Skip to content

Commit

Permalink
ST: Enable asan for ST when configuring.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 22, 2024
1 parent 4766ceb commit 0fb76c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions trunk/auto/depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ fi
if [[ $SRS_DEBUG_STATS == YES ]]; then
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DDEBUG_STATS"
fi
# Whether to enable asan.
if [[ $SRS_SANITIZER == YES ]]; then
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DMD_ASAN -fsanitize=address -fno-omit-frame-pointer"
fi
# Pass the global extra flags.
if [[ $SRS_EXTRA_FLAGS != '' ]]; then
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS $SRS_EXTRA_FLAGS"
Expand Down
4 changes: 0 additions & 4 deletions trunk/research/st/asan-switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ g++ asan-switch.cpp ../../objs/st/libst.a -fsanitize=address -fno-omit-frame-poi
#include <sys/resource.h>
#include "../../objs/st/st.h"

extern "C" {
extern void st_set_primordial_stack(void* top, void* bottom);
}

void* foo(void *args) {
for (int i = 0; ; i++) {
st_sleep(1);
Expand Down

0 comments on commit 0fb76c7

Please sign in to comment.