HomePhabricator

[sanitizer] Add strlen to the common interceptors

Description

[sanitizer] Add strlen to the common interceptors

Summary:
Adds strlen to the common interceptors, under a new common flag
intercept_strlen. This provides better sharing of interception code among
sanitizers and cleans up the inconsistent type declarations of the
previously duplicated interceptors.

Removes the now-duplicate strlen interceptor from asan, msan, and tsan.
The entry check semantics are normalized now for msan and asan, whose
private strlen interceptors contained multiple layers of checks that
included impossible-to-reach code. The new semantics are identical to the
old: bypass interception if in the middle of init or if both on Mac and not
initialized; else, call the init routine and proceed.

Patch by Derek Bruening!

Reviewers: samsonov, vitalybuka

Subscribers: llvm-commits, kcc, zhaoqin

Differential Revision: http://reviews.llvm.org/D18020

Details

Committed
samsonovMar 10 2016, 4:45 PM
Differential Revision
D18020: [sanitizer] Add strlen to the common interceptors
Parents
rL263176: [UBSan] Improve bufferization of UBSan error reports.
Branches
Unknown
Tags
Unknown