[compiler-rt] [sanitizer_symbolizer] Use correct format strings for uptr (PR #89815)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 15:03:45 PDT 2024
================
@@ -119,11 +119,10 @@ static void RenderMmaps(InternalScopedString *buffer,
// module.base_address == dlpi_addr
// range.beg == dlpi_addr + p_vaddr
// relative address == p_vaddr == range.beg - module.base_address
- buffer->AppendF(
- kFormatMmap, reinterpret_cast<void *>(range.beg),
- static_cast<unsigned int>(range.end - range.beg),
- static_cast<int>(moduleId), accessBuffer.data(),
- static_cast<unsigned int>(range.beg - module.base_address()));
+ buffer->AppendF(kFormatMmap, reinterpret_cast<void *>(range.beg),
+ static_cast<size_t>(range.end - range.beg),
----------------
vitalybuka wrote:
no need to cast size_t
I am saying that compiler-rt (sanitizers) use uptr to format as size_t.
It's all over the code, it should be OK to pass uptr into %zx.
https://github.com/llvm/llvm-project/pull/89815
More information about the llvm-commits
mailing list