mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-05 22:08:23 +00:00
Activate asan for mip_test
This commit is contained in:
1 parent
1237185bb4
commit
6a47ff6422
4 files changed
+5
-5
No files matched your search
@@ -10,7 +10,7 @@ ENV ?= -e Tmp=. -e WINEDEBUG=-all
|
|||||||
DOCKER ?= docker run --platform linux/amd64 --rm $(ENV) -v $(CWD):$(CWD) -w $(CWD)
|
DOCKER ?= docker run --platform linux/amd64 --rm $(ENV) -v $(CWD):$(CWD) -w $(CWD)
|
||||||
VCFLAGS = /nologo /W3 /O2 /MD /I. $(DEFS) $(TFLAGS)
|
VCFLAGS = /nologo /W3 /O2 /MD /I. $(DEFS) $(TFLAGS)
|
||||||
IPV6 ?= 1
|
IPV6 ?= 1
|
||||||
ASAN ?= -fsanitize=address,undefined -fno-sanitize-recover=all
|
ASAN ?= -fsanitize=address,undefined,alignment -fno-sanitize-recover=all -fno-omit-frame-pointer -fno-common
|
||||||
ASAN_OPTIONS ?= detect_leaks=1
|
ASAN_OPTIONS ?= detect_leaks=1
|
||||||
EXAMPLES := $(dir $(wildcard examples/*/Makefile)) $(wildcard examples/stm32/nucleo-*)
|
EXAMPLES := $(dir $(wildcard examples/*/Makefile)) $(wildcard examples/stm32/nucleo-*)
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
@@ -44,7 +44,7 @@ endif
|
|||||||
all: mg_prefix unamalgamated test mip_test arm examples vc98 vc17 vc22 mingw mingw++ fuzz
|
all: mg_prefix unamalgamated test mip_test arm examples vc98 vc17 vc22 mingw mingw++ fuzz
|
||||||
|
|
||||||
mip_test: test/mip_test.c mongoose.c mongoose.h Makefile
|
mip_test: test/mip_test.c mongoose.c mongoose.h Makefile
|
||||||
$(CC) test/mip_test.c $(INCS) $(WARN) $(OPTS) $(C_WARN) -o $@
|
$(CC) test/mip_test.c $(INCS) $(WARN) $(OPTS) $(C_WARN) $(ASAN) -o $@
|
||||||
ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./$@
|
ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./$@
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
|
|||||||
+1
-1
@@ -68,7 +68,7 @@ static uint32_t get_hclk(void) {
|
|||||||
} else {
|
} else {
|
||||||
clk = hsi;
|
clk = hsi;
|
||||||
}
|
}
|
||||||
int hpre = (RCC->CFGR & (0x0F << 4)) >> 4;
|
uint32_t hpre = (RCC->CFGR & (15 << 4)) >> 4;
|
||||||
if (hpre < 8) return clk;
|
if (hpre < 8) return clk;
|
||||||
|
|
||||||
uint8_t ahbptab[8] = {1, 2, 3, 4, 6, 7, 8, 9}; // log2(div)
|
uint8_t ahbptab[8] = {1, 2, 3, 4, 6, 7, 8, 9}; // log2(div)
|
||||||
|
|||||||
+1
-2
@@ -6058,7 +6058,7 @@ static uint32_t get_hclk(void) {
|
|||||||
} else {
|
} else {
|
||||||
clk = hsi;
|
clk = hsi;
|
||||||
}
|
}
|
||||||
int hpre = (RCC->CFGR & (0x0F << 4)) >> 4;
|
uint32_t hpre = (RCC->CFGR & (15 << 4)) >> 4;
|
||||||
if (hpre < 8) return clk;
|
if (hpre < 8) return clk;
|
||||||
|
|
||||||
uint8_t ahbptab[8] = {1, 2, 3, 4, 6, 7, 8, 9}; // log2(div)
|
uint8_t ahbptab[8] = {1, 2, 3, 4, 6, 7, 8, 9}; // log2(div)
|
||||||
@@ -6765,7 +6765,6 @@ static void rx_dhcp(struct mip_if *ifp, struct pkt *pkt) {
|
|||||||
uint32_t lease = 0;
|
uint32_t lease = 0;
|
||||||
memcpy(&lease, p + 2, sizeof(lease));
|
memcpy(&lease, p + 2, sizeof(lease));
|
||||||
ifp->lease_expire = ifp->now + mg_ntohl(lease) * 1000;
|
ifp->lease_expire = ifp->now + mg_ntohl(lease) * 1000;
|
||||||
// MG_INFO(("LEASEEEEEE %lld", ifp->lease_expire - ifp->now));
|
|
||||||
}
|
}
|
||||||
p += p[1] + 2;
|
p += p[1] + 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#define MG_ENABLE_SOCKET 0
|
#define MG_ENABLE_SOCKET 0
|
||||||
|
#define MG_ENABLE_LINES 1
|
||||||
#define MG_ENABLE_MIP 1
|
#define MG_ENABLE_MIP 1
|
||||||
#define MG_ENABLE_PACKED_FS 0
|
#define MG_ENABLE_PACKED_FS 0
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user