This is an archive of the discontinued LLVM Phabricator instance.

Fix a suspicious check in TargetLibraryInfo
ClosedPublic

Authored by ab on May 23 2016, 2:52 PM.

Details

Summary

The check for some of the builtin functions involves checking if the number
of the parameter is zero and the first parameter is a pointer type. This check
either returns false or an out-of-bound memory access.

rdar://problem/26424030

Diff Detail

Event Timeline

steven_wu updated this revision to Diff 58157.May 23 2016, 2:52 PM
steven_wu retitled this revision from to Fix a suspicious check in TargetLibraryInfo.
steven_wu updated this object.
steven_wu added reviewers: ab, mzolotukhin.
steven_wu added a subscriber: llvm-commits.
ab requested changes to this revision.May 25 2016, 7:58 AM
ab edited edge metadata.

Looks good, but can you test the other changed functions? If you'd like, I can take care of it.

This revision now requires changes to proceed.May 25 2016, 7:58 AM
ab commandeered this revision.May 25 2016, 1:00 PM
ab edited reviewers, added: steven_wu; removed: ab.
ab updated this revision to Diff 58485.May 25 2016, 1:08 PM
  • Test everything
steven_wu accepted this revision.May 25 2016, 1:27 PM
steven_wu edited edge metadata.

Thanks for adding all the tests! LGTM

This revision is now accepted and ready to land.May 25 2016, 1:27 PM
This revision was automatically updated to reflect the committed changes.