Skip to content

Commit

Permalink
add comment about formatting to string vs. memory buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldreik committed Jun 9, 2019
1 parent 74c0ed0 commit e361bfc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/fuzzing/chrono_duration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ template <typename Item, typename Ratio>
void invoke_inner(fmt::string_view formatstring, const Item item) {
const std::chrono::duration<Item, Ratio> value(item);
try {
//std::string message = fmt::format(formatstring, value);
// Don't switch these two dynamically,
// there is already a large combinatoric explosion
// of type and ratio, causing afl to suffer and the corpus
// getting enormous. Occasionally, flip this switch and
// try manually.
#if 0
std::string message = fmt::format(formatstring, value);
#else
fmt::memory_buffer buf;
fmt::format_to(buf, formatstring, value);
#endif
} catch (std::exception& e) {
}
}
Expand Down

0 comments on commit e361bfc

Please sign in to comment.