mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
ed47bccbaf
Multiple times we faced an issue of huge outputs due to unexpected behavior or incorrect test cases. The last one was https://reviews.llvm.org/D80629#2073066. This patch limits the output to 10 Mb for ELF and introduces the --max-size to change this limit. I've tried to keep the implementation non-intrusive. The current logic we have is that we prepare section content in a buffer first and write it to the output later. This patch checks the available limit on each writing attempt to this buffer and stops writing when the limit is reached and raises the internal error flag. Later, this flag is is checked before the actual writing to a file happens and an error is reported. Differential revision: https://reviews.llvm.org/D81258 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
yaml2obj.cpp |