This is an archive of the discontinued LLVM Phabricator instance.

added more hooks for fuzzing into DFSan
Needs ReviewPublic

Authored by farahhariri on Aug 8 2017, 10:57 AM.

Details

Reviewers
kcc
phosek
Summary

added more hooks into dfsan, mostly used for fuzzing with libFuzzer

Event Timeline

farahhariri created this revision.Aug 8 2017, 10:57 AM
kcc edited edge metadata.Aug 8 2017, 10:59 AM

are tests possible here?

farahhariri added a comment.EditedAug 8 2017, 3:44 PM
In D36477#835621, @kcc wrote:

are tests possible here?

my first thought on testing is that I could add a dummy code that
has a strcpy call for example, and define dfsan_weak_hook_strcpy
such that it sets some boolean to true (initially false). And then
assert that the value is changed to true.
But do you think we should have a test for every single hook?
like even the already existing ones (which don't have any tests
as far as I can tell)?

kcc added a comment.Aug 8 2017, 3:55 PM
In D36477#835621, @kcc wrote:

are tests possible here?

my first thought on testing is that I could add a dummy code that
has a strcpy call for example, and define dfsan_weak_hook_strcpy
such that it sets some boolean to true (initially false). And then
assert that the value is changed to true.

Yep, something of this kind.

But do you think we should have a test for every single hook?

Yes.

like even the already existing ones (which don't have any tests
as far as I can tell)?

Correct. This is probably my fault. The existing hooks were done as an experiment and later all their uses were removed.