[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
Mon Mar 1 13:25:18 PST 2021


mstorsjo added a comment.

In D97579#2594982 <https://reviews.llvm.org/D97579#2594982>, @rnk wrote:

> I dug back to 2014 to find out why we have this flag: rG167c15a98feb898c13eca325678b73d0c59dffa2 <https://reviews.llvm.org/rG167c15a98feb898c13eca325678b73d0c59dffa2> Unfortunately, it seems there is no rationale. I'm guessing it's carried over from TSan, which has this flag. TSan uses sanitizer_common, so if tsan cares about frame size, then sanitizer_common does. The TSan warning flag comes from rG06379b35373e0ca9561c130284104fbdf0295f79 <https://reviews.llvm.org/rG06379b35373e0ca9561c130284104fbdf0295f79>, but again, no rationale or link to a review thread. =/
>
> Instead of disabling the warning and adding ifdefs, maybe it's better to just fix the warning with `InternalMmapVector<wchar_t>`. The vast majority of uses of kMaxPathLength are for local InternalScopedString variables.

Thanks for digging in! I've added a couple similar ones before - I can undo those and use `InternalMmapVector<>` for those too - but I don't (yet) have a setup where I can easily run the sanitizer tests - do you happen to have that? I'll post an alternative patch with that in any case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97579/new/

https://reviews.llvm.org/D97579



More information about the llvm-commits mailing list