[PATCH] D97579: [compiler-rt] Silence warnings about large stack frames in ReadBinaryName
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 14:34:32 PST 2021
mstorsjo created this revision.
mstorsjo added reviewers: akhuang, rnk.
Herald added a subscriber: dberris.
mstorsjo requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
The disabling of the warning also needs to cover ReadLongProcessName, which ends up inlining the function and producing a separate warning about stack size.
Other cases of the same were silenced similarly in D91853 <https://reviews.llvm.org/D91853>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97579
Files:
compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
Index: compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
+++ compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
@@ -1059,6 +1059,10 @@
return "unknown exception";
}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wframe-larger-than="
+#endif
uptr ReadBinaryName(/*out*/char *buf, uptr buf_len) {
if (buf_len == 0)
return 0;
@@ -1082,6 +1086,9 @@
uptr ReadLongProcessName(/*out*/char *buf, uptr buf_len) {
return ReadBinaryName(buf, buf_len);
}
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
void CheckVMASize() {
// Do nothing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97579.326803.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210226/1fa30e66/attachment.bin>
More information about the llvm-commits
mailing list