[PATCH] D128971: fix for user-func-reorder.c test
Alexey Moksyakov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 00:19:50 PDT 2022
yavtuk created this revision.
yavtuk added reviewers: maksfb, rafaelauler.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: Amir.
Herald added a project: All.
yavtuk requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
This patch removes memset usage from C library
relative to https://reviews.llvm.org/D128960 commit
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128971
Files:
bolt/runtime/hugify.cpp
Index: bolt/runtime/hugify.cpp
===================================================================
--- bolt/runtime/hugify.cpp
+++ bolt/runtime/hugify.cpp
@@ -27,7 +27,7 @@
#ifdef MADV_HUGEPAGE
/// Check whether the kernel supports THP via corresponding sysfs entry.
static bool has_pagecache_thp_support() {
- char buf[256] = {0};
+ char buf[256];
const char *madviseStr = "always [madvise] never";
int fd = __open("/sys/kernel/mm/transparent_hugepage/enabled",
@@ -35,6 +35,7 @@
if (fd < 0)
return false;
+ memSet(buf, 0, sizeof(buf));
size_t res = __read(fd, buf, 256);
if (res < 0)
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128971.441611.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220701/8604936e/attachment.bin>
More information about the llvm-commits
mailing list