This is an archive of the discontinued LLVM Phabricator instance.

[DFSan] Add custom wrapper for getsockopt.
ClosedPublic

Authored by morehouse on Dec 9 2020, 12:25 PM.

Details

Summary

The wrapper clears shadow for optval and optlen when written.

Diff Detail

Event Timeline

morehouse requested review of this revision.Dec 9 2020, 12:25 PM
morehouse created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2020, 12:25 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.Dec 9 2020, 12:53 PM
This revision is now accepted and ready to land.Dec 9 2020, 12:53 PM
compiler-rt/test/dfsan/custom.cpp
947

add or modify a test case when the returned optlen can be smaller than its input?

This seems an interesting case to test.

morehouse updated this revision to Diff 310633.Dec 9 2020, 1:21 PM
morehouse marked an inline comment as done.
  • Pass a larger buf than is written to by getsockopt.
This revision was landed with ongoing or failed builds.Dec 9 2020, 2:30 PM
This revision was automatically updated to reflect the committed changes.