Add interceptors for the strtoi(3)/strtou(3) from NetBSD
authorKamil Rytarowski <n54@gmx.com>
Fri, 7 Dec 2018 22:24:35 +0000 (22:24 +0000)
committerKamil Rytarowski <n54@gmx.com>
Fri, 7 Dec 2018 22:24:35 +0000 (22:24 +0000)
commitae3ae31e9c40fb20b6cb3c0fd01f65db454e1c14
treec2d6f4c75d81498b47add879eb96883a29f095e1
parent43cfce88b48d732d9ab56826b917890c5fb15c48
Add interceptors for the strtoi(3)/strtou(3) from NetBSD

Summary:
strtoi/strtou converts string value to an intmax_t/uintmax_t integer.

Add a dedicated test.

Enable this API for NetBSD.

It's a reworked version of the original work by Yang Zheng.

Reviewers: joerg, vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, tomsun.0.7, mgorny, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D54702

llvm-svn: 348663
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
compiler-rt/test/sanitizer_common/TestCases/NetBSD/strtoi.cc [new file with mode: 0644]