summaryrefslogtreecommitdiff
path: root/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
diff options
context:
space:
mode:
authorAmit Kumar Pandey <pandey.kumaramit2023@gmail.com>2025-09-16 23:41:20 +0530
committerGitHub <noreply@github.com>2025-09-16 11:11:20 -0700
commit46fd8d0db2f7f7361823efae067edddb6acc237c (patch)
tree740934f0b6ed27759998a1103f26bd3b308e0e14 /compiler-rt/lib/fuzzer/FuzzerLoop.cpp
parentf854009307d3f3750d3358510ef632571683acb5 (diff)
Reapply "[NFC] Fix CodeQL violations in compiler-rt. (#157793)" (#157913) (#159097)
Fix below buildbot failure. ``` /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:172:42: error: use of undeclared identifier 'uint' 172 | Printf("Flag: %s %u\n", Name, (uint)Val); ``` Replace uint with uint32_t cast. This reverts commit 8062b166762b51f1c3a9168e7031babde3e330a8.
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerLoop.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerLoop.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
index 6f415dd5763a..75c2fb71eb07 100644
--- a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
@@ -125,8 +125,8 @@ void FreeHook(const volatile void *ptr) {
void Fuzzer::HandleMalloc(size_t Size) {
if (!Options.MallocLimitMb || (Size >> 20) < (size_t)Options.MallocLimitMb)
return;
- Printf("==%d== ERROR: libFuzzer: out-of-memory (malloc(%zd))\n", GetPid(),
- Size);
+ Printf("==%d== ERROR: libFuzzer: out-of-memory (malloc(%zd))\n",
+ (int)GetPid(), Size);
Printf(" To change the out-of-memory limit use -rss_limit_mb=<N>\n\n");
PrintStackTrace();
DumpCurrentUnit("oom-");
@@ -568,7 +568,7 @@ size_t Fuzzer::GetCurrentUnitInFuzzingThead(const uint8_t **Data) const {
void Fuzzer::CrashOnOverwrittenData() {
Printf("==%d== ERROR: libFuzzer: fuzz target overwrites its const input\n",
- GetPid());
+ (int)GetPid());
PrintStackTrace();
Printf("SUMMARY: libFuzzer: overwrites-const-input\n");
DumpCurrentUnit("crash-");