Avoid parsing large YAML file.
YAML files tend to be very large compared to binary formats because of ASCII format inefficiency. And the YAML reader consumes an excessively large amount of memory when parsing a large file. It's very slow too. For example, I observed that 6MB executable became 120MB YAML file, and the YAML reader consumed more than 1.5GB memory to load it. The YAML reader even caused OOM error on 32 bit, causing the entire process to fail. This patch sets the limit on the YAML file size the linker will try to load in the RoundTripYAML test as a safeguard. llvm-svn: 194666
Loading
Please register or sign in to comment