From e70facd027368b79422d837d42bf1b1c71e20fe4 Mon Sep 17 00:00:00 2001 From: TL Date: Tue, 17 Dec 2024 11:42:49 +0800 Subject: [PATCH] use macro to control zephyr thread stats info --- core/shared/platform/zephyr/zephyr_time.c | 4 ++++ product-mini/platforms/zephyr/simple/build_and_run.sh | 2 +- tests/fuzz/wasm-mutator-fuzz/portal/osv-scanner.toml | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/core/shared/platform/zephyr/zephyr_time.c b/core/shared/platform/zephyr/zephyr_time.c index 59b720e414..59bc34b0ab 100644 --- a/core/shared/platform/zephyr/zephyr_time.c +++ b/core/shared/platform/zephyr/zephyr_time.c @@ -14,6 +14,7 @@ os_time_get_boot_us() uint64 os_time_thread_cputime_us(void) { +#ifdef CONFIG_THREAD_RUNTIME_STATS k_tid_t tid; struct k_thread_runtime_stats stats; uint32 clock_freq; @@ -27,4 +28,7 @@ os_time_thread_cputime_us(void) } return time_in_us; +#else + return os_time_get_boot_us(); +#endif } diff --git a/product-mini/platforms/zephyr/simple/build_and_run.sh b/product-mini/platforms/zephyr/simple/build_and_run.sh index 6b8fb4f872..bd89906d4a 100755 --- a/product-mini/platforms/zephyr/simple/build_and_run.sh +++ b/product-mini/platforms/zephyr/simple/build_and_run.sh @@ -38,7 +38,7 @@ TARGET=$1 case $TARGET in $X86_TARGET) - west build -b qemu_x86_nommu \ + west build -b qemu_x86_tiny \ . -p always -- \ -DWAMR_BUILD_TARGET=X86_32 west build -t run diff --git a/tests/fuzz/wasm-mutator-fuzz/portal/osv-scanner.toml b/tests/fuzz/wasm-mutator-fuzz/portal/osv-scanner.toml index 1eb55cd8df..60b382085e 100644 --- a/tests/fuzz/wasm-mutator-fuzz/portal/osv-scanner.toml +++ b/tests/fuzz/wasm-mutator-fuzz/portal/osv-scanner.toml @@ -50,3 +50,10 @@ name = "vite" ecosystem = "npm" ignore = true reason = "Development server not exposed to untrusted networks" + +# GHSA-mwcw-c2x4-8c55 +[[PackageOverrides]] +name = "nanoid" +ecosystem = "npm" +ignore = true +reason = "Accepted known vulnerabilities for testing purposes" \ No newline at end of file