From: William C. <wc...@us...> - 2018-07-13 20:22:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "oprofile". The branch, wcohen/f28_fixes has been updated via 182c52afe14cbe904ab36993099a432c5be8bb91 (commit) from eaa4c0c67f9542c63efa656bdee59798f7abfd7d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 182c52afe14cbe904ab36993099a432c5be8bb91 Author: William Cohen <wc...@re...> Date: Fri Jul 13 16:06:18 2018 -0400 Make it clear to GCC that the strncpy limited to the buffer size The Fedora 28 GCC 8.1.1 has increased bounds checking of operations such as strncpy. However, the code in the _record_module_info function tripped up this analysis. To avoid the error below the code now just uses the size of the destination buffer as the limit. g++ -DHAVE_CONFIG_H -I. -I.. -I ../libabi -I ../libutil -I ../libutil++ -I ../libop -I ../libdb -I ../libperf_events -I ../libpe_utils -W -Wall -fno-common -Werror -g -O2 -MT operf_utils.o -MD -MP -MF .deps/operf_utils.Tpo -c -o operf_utils.o operf_utils.cpp In function âvoid _record_module_info(int, operf_record*)â, inlined from âvoid OP_perf_utils::op_record_kernel_info(std::__cxx11::string, u64, u64, int, operf_record*)â at operf_utils.cpp:1408:22: operf_utils.cpp:1343:10: error: âchar* strncpy(char*, const char*, size_t)â specified bound depends on the length of the source argument [-Werror=stringop-overflow=] strncpy(mmap.filename, module_name, size); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ operf_utils.cpp: In function âvoid OP_perf_utils::op_record_kernel_info(std::__cxx11::string, u64, u64, int, operf_record*)â: operf_utils.cpp:1342:16: note: length computed here size = strlen(module_name) + 1; ~~~~~~^~~~~~~~~~~~~ cc1plus: all warnings being treated as errors make: *** [Makefile:457: operf_utils.o] Error 1 ----------------------------------------------------------------------- Summary of changes: libperf_events/operf_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- oprofile |