[PATCH] D52646: Switch sanitizer_procmaps_bsd to internal_sysctl
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 29 00:46:48 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT343370: Switch sanitizer_procmaps_bsd to internal_sysctl (authored by kamil, committed by ).
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D52646
Files:
lib/sanitizer_common/sanitizer_procmaps_bsd.cc
Index: lib/sanitizer_common/sanitizer_procmaps_bsd.cc
===================================================================
--- lib/sanitizer_common/sanitizer_procmaps_bsd.cc
+++ lib/sanitizer_common/sanitizer_procmaps_bsd.cc
@@ -67,16 +67,16 @@
#endif
};
- size_t Size = 0;
- int Err = sysctl(Mib, ARRAY_SIZE(Mib), NULL, &Size, NULL, 0);
+ uptr Size = 0;
+ int Err = internal_sysctl(Mib, ARRAY_SIZE(Mib), NULL, &Size, NULL, 0);
CHECK_EQ(Err, 0);
CHECK_GT(Size, 0);
#if !SANITIZER_OPENBSD
size_t MmapedSize = Size * 4 / 3;
void *VmMap = MmapOrDie(MmapedSize, "ReadProcMaps()");
Size = MmapedSize;
- Err = sysctl(Mib, ARRAY_SIZE(Mib), VmMap, &Size, NULL, 0);
+ Err = internal_sysctl(Mib, ARRAY_SIZE(Mib), VmMap, &Size, NULL, 0);
CHECK_EQ(Err, 0);
proc_maps->data = (char *)VmMap;
#else
@@ -88,7 +88,7 @@
if (Size > 0x10000)
Size = 0x10000;
Size = (Size / sizeof(struct kinfo_vmentry)) * sizeof(struct kinfo_vmentry);
- Err = sysctl(Mib, ARRAY_SIZE(Mib), Mem, &Size, NULL, 0);
+ Err = internal_sysctl(Mib, ARRAY_SIZE(Mib), Mem, &Size, NULL, 0);
CHECK_EQ(Err, 0);
MmapedSize = Size;
proc_maps->data = Mem;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52646.167582.patch
Type: text/x-patch
Size: 1160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180929/c8aa80a3/attachment.bin>
More information about the llvm-commits
mailing list