aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-04-24 09:45:01 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-04-24 08:05:31 +0000
commit9c80ffa0c732875f03df82e97c8294cfdf76c8a5 (patch)
treeb098ca0de6235d567102ec379fe05effdc6646cb /executor
parent40036e99fc252de1dcaf9cc72a33a34e39b91b65 (diff)
all: adjust to the new clang tidy checks
clang-tidy-20 generates many more failures, many of which are in the flartrpc library. Let's disable clang-analyzer-optin.core.EnumCastOutOfRange for now. It also complained about PROT_EXEC in the executor, but that is necessary to support syz_execute_func().
Diffstat (limited to 'executor')
-rw-r--r--executor/executor_linux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/executor/executor_linux.h b/executor/executor_linux.h
index 9784700ba..0ae1155bb 100644
--- a/executor/executor_linux.h
+++ b/executor/executor_linux.h
@@ -62,7 +62,9 @@ static void os_init(int argc, char** argv, char* data, size_t data_size)
void* got = mmap(data - SYZ_PAGE_SIZE, SYZ_PAGE_SIZE, PROT_NONE, MAP_ANON | MAP_PRIVATE | MAP_FIXED_EXCLUSIVE, -1, 0);
if (data - SYZ_PAGE_SIZE != got)
failmsg("mmap of left data PROT_NONE page failed", "want %p, got %p", data - SYZ_PAGE_SIZE, got);
+ // NOLINTBEGIN(clang-analyzer-security.MmapWriteExec)
got = mmap(data, data_size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE | MAP_FIXED_EXCLUSIVE, -1, 0);
+ // NOLINTEND(clang-analyzer-security.MmapWriteExec)
if (data != got)
failmsg("mmap of data segment failed", "want %p, got %p", data, got);
got = mmap(data + data_size, SYZ_PAGE_SIZE, PROT_NONE, MAP_ANON | MAP_PRIVATE | MAP_FIXED_EXCLUSIVE, -1, 0);