[PATCH] D66021: [Sanitizer] Disable -Wframe-larger-than on SystemZ
Kian Moniri via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 9 11:30:59 PDT 2019
kianm created this revision.
kianm added reviewers: kbarton, uweigand, rnk.
Herald added subscribers: atanasyan, arichardson, mgorny, sdardis.
Herald added a project: LLVM.
These warnings are showing up on the SystemZ build bots [http://lab.llvm.org:8011/builders/clang-s390x-linux-multistage/builds/6366/steps/build%20stage%202/logs/warnings%20%2810%29]:
/home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:534:50: warning: stack frame size of 616 bytes in function '__sanitizer::SuspendedThreadsListLinux::GetRegistersAndSP' [-Wframe-larger-than=]
1 warning generated.
/home/uweigand/sandbox/buildbot/clang-s390x-linux-multistage/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h:340:8: warning: stack frame size of 592 bytes in function '__sanitizer::SizeClassAllocator32<__sanitizer::AP32>::PopulateFreeList' [-Wframe-larger-than=]
1 warning generated.
The frame sizes of the two functions look correct to us. Each function has a large local variable: GetRegistersAndSP has a variable "regs" which is about 432 bytes in size, PopulateFreeList has a variable "shuffle_array" which is about 384 bytes in size. When you consider the default SystemZ frame size of 160 bytes, the stack frame size will exceed the limit of 570 bytes set by the CMakeFile.
This patch adds the same exception as in PowerPC and MIPS.
Repository:
rL LLVM
https://reviews.llvm.org/D66021
Files:
compiler-rt/CMakeLists.txt
Index: compiler-rt/CMakeLists.txt
===================================================================
--- compiler-rt/CMakeLists.txt
+++ compiler-rt/CMakeLists.txt
@@ -335,12 +335,12 @@
endif()
# Determine if we should restrict stack frame sizes.
-# Stack frames on PowerPC and Mips and in debug biuld can be much larger than
+# Stack frames on PowerPC, Mips, SystemZ and in debug build can be much larger than
# anticipated.
# FIXME: Fix all sanitizers and add -Wframe-larger-than to
# SANITIZER_COMMON_FLAGS
if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG AND NOT COMPILER_RT_DEBUG
- AND NOT ${COMPILER_RT_DEFAULT_TARGET_ARCH} MATCHES "powerpc|mips")
+ AND NOT ${COMPILER_RT_DEFAULT_TARGET_ARCH} MATCHES "powerpc|mips|s390x")
set(SANITIZER_LIMIT_FRAME_SIZE TRUE)
else()
set(SANITIZER_LIMIT_FRAME_SIZE FALSE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66021.214411.patch
Type: text/x-patch
Size: 824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190809/ab303a91/attachment.bin>
More information about the llvm-commits
mailing list