This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] FuzzedDataProvider: do not call memcpy on empty vector.
ClosedPublic

Authored by Dor1s on Dec 4 2019, 1:27 PM.

Details

Summary

Some versions of memcpy mark pointer arguments as __nonnull, that triggers UBSan
errors even when the length passed is 0.

Diff Detail

Event Timeline

Dor1s created this revision.Dec 4 2019, 1:27 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 4 2019, 1:27 PM
Herald added subscribers: llvm-commits, Restricted Project, dberris. · View Herald Transcript
Dor1s updated this revision to Diff 232196.Dec 4 2019, 1:28 PM
  • remove empty line
Dor1s accepted this revision.Dec 4 2019, 1:28 PM

TBR simple change.

This revision is now accepted and ready to land.Dec 4 2019, 1:28 PM
Harbormaster completed remote builds in B41878: Diff 232196.
metzman accepted this revision.Dec 4 2019, 1:34 PM

LGTM.
Thanks!

Dor1s updated this revision to Diff 232202.Dec 4 2019, 1:58 PM
  • [compiler-rt] FDP: assert that num_bytes_to_consume == 0 when size == 0.
Dor1s updated this revision to Diff 232208.Dec 4 2019, 2:08 PM

another rebase

Harbormaster completed remote builds in B41885: Diff 232208.
This revision was automatically updated to reflect the committed changes.