This is an archive of the discontinued LLVM Phabricator instance.

[libFuzzer] Decrease stack usage in unit tests
ClosedPublic

Authored by aarongreen on Dec 6 2017, 3:30 PM.

Details

Summary

With 3 Dictionary objects, each containing space of ~16k DictionaryEntry objects, the MutationDispatcher object is fairly memory heavy. On platforms with a lower default stack size, this can cause panics in FuzzerUnittest as those tests stack-allocate the MutationDispatcher. This may be especially problematic for platforms that do not (yet) have a way to programmatically change their stack size, aside from link-time flags. In general, it seems more prudent to use the heap for an object of this size.

Diff Detail

Event Timeline

aarongreen created this revision.Dec 6 2017, 3:30 PM
kcc accepted this revision.Dec 6 2017, 3:33 PM

LGTM,
I'll land

This revision is now accepted and ready to land.Dec 6 2017, 3:33 PM
kcc closed this revision.Dec 6 2017, 3:35 PM