This is an archive of the discontinued LLVM Phabricator instance.

[asan] Fix strncmp and strncasecmp interceptors
ClosedPublic

Authored by vitalybuka on Nov 11 2016, 8:35 PM.

Details

Summary

In non-strict mode we will check memory access for both strings from beginning
to either:

  1. 0-char
  2. size
  3. different chars

In strict mode we will check from beginning to either:

  1. 0-char
  2. size

Previously in strict mode we always checked up to the 0-char.

Diff Detail

Repository
rL LLVM

Event Timeline

vitalybuka updated this revision to Diff 77707.Nov 11 2016, 8:35 PM
vitalybuka retitled this revision from to [asan] Fix strncmp and strncasecmp interceptors.
vitalybuka updated this object.
vitalybuka added reviewers: kcc, eugenis.
vitalybuka added a subscriber: llvm-commits.
This revision was automatically updated to reflect the committed changes.