Bump fuzzer allocation limit

This commit is contained in:
Victor Zverovich 2020-04-30 08:45:50 -07:00
parent 3e69847616
commit f19d667943

View File

@ -700,7 +700,7 @@ class basic_memory_buffer : public internal::buffer<T> {
template <typename T, std::size_t SIZE, typename Allocator>
void basic_memory_buffer<T, SIZE, Allocator>::grow(std::size_t size) {
#ifdef FMT_FUZZ
if (size > 1000) throw std::runtime_error("fuzz mode - won't grow that much");
if (size > 5000) throw std::runtime_error("fuzz mode - won't grow that much");
#endif
std::size_t old_capacity = this->capacity();
std::size_t new_capacity = old_capacity + old_capacity / 2;
@ -1138,7 +1138,7 @@ template <typename Char> class float_writer {
return it;
}
#ifdef FMT_FUZZ
if (num_zeros > 1000)
if (num_zeros > 5000)
throw std::runtime_error("fuzz mode - avoiding excessive cpu use");
#endif
it = std::fill_n(it, num_zeros, static_cast<Char>('0'));