mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-27 06:35:37 +00:00
Bump fuzzer allocation limit
This commit is contained in:
parent
3e69847616
commit
f19d667943
@ -700,7 +700,7 @@ class basic_memory_buffer : public internal::buffer<T> {
|
|||||||
template <typename T, std::size_t SIZE, typename Allocator>
|
template <typename T, std::size_t SIZE, typename Allocator>
|
||||||
void basic_memory_buffer<T, SIZE, Allocator>::grow(std::size_t size) {
|
void basic_memory_buffer<T, SIZE, Allocator>::grow(std::size_t size) {
|
||||||
#ifdef FMT_FUZZ
|
#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
|
#endif
|
||||||
std::size_t old_capacity = this->capacity();
|
std::size_t old_capacity = this->capacity();
|
||||||
std::size_t new_capacity = old_capacity + old_capacity / 2;
|
std::size_t new_capacity = old_capacity + old_capacity / 2;
|
||||||
@ -1138,7 +1138,7 @@ template <typename Char> class float_writer {
|
|||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
#ifdef FMT_FUZZ
|
#ifdef FMT_FUZZ
|
||||||
if (num_zeros > 1000)
|
if (num_zeros > 5000)
|
||||||
throw std::runtime_error("fuzz mode - avoiding excessive cpu use");
|
throw std::runtime_error("fuzz mode - avoiding excessive cpu use");
|
||||||
#endif
|
#endif
|
||||||
it = std::fill_n(it, num_zeros, static_cast<Char>('0'));
|
it = std::fill_n(it, num_zeros, static_cast<Char>('0'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user