[compiler-rt] [sanitizer_common] [Darwin] Fix strncmp => internal_strncmp in NextSegmentLoad (PR #166972)
Andrew Haberlandt via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 09:44:14 PST 2025
https://github.com/ndrewh created https://github.com/llvm/llvm-project/pull/166972
None
>From b2c8d4c6215d6c6654c792d80789616643f2b4a9 Mon Sep 17 00:00:00 2001
From: Andrew Haberlandt <ahaberlandt at apple.com>
Date: Fri, 7 Nov 2025 08:47:44 -0800
Subject: [PATCH] [sanitizer_common] [Darwin] Fix strncmp => internal_strncmp
in NextSegmentLoad
---
compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp
index 72f4bbf212f9a..e5008041bbb59 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp
@@ -305,7 +305,7 @@ static bool NextSegmentLoad(MemoryMappedSegment *segment,
layout_data->current_load_cmd_count--;
if (((const load_command *)lc)->cmd == kLCSegment) {
const SegmentCommand* sc = (const SegmentCommand *)lc;
- if (strncmp(sc->segname, "__LINKEDIT", sizeof("__LINKEDIT")) == 0) {
+ if (internal_strncmp(sc->segname, "__LINKEDIT", sizeof("__LINKEDIT")) == 0) {
// The LINKEDIT sections are for internal linker use, and may alias
// with the LINKEDIT section for other modules. (If we included them,
// our memory map would contain overlappping sections.)
More information about the llvm-commits
mailing list