Split getpwent and fgetgrent functions in interceptors
authorKamil Rytarowski <n54@gmx.com>
Fri, 2 Nov 2018 20:28:10 +0000 (20:28 +0000)
committerKamil Rytarowski <n54@gmx.com>
Fri, 2 Nov 2018 20:28:10 +0000 (20:28 +0000)
commit8deda5fbd870facdc010fa6b0d6d51759d0f443b
treeb1be7e37eb4460a445fa6f8ef94775e5ed146eb4
parentd2941b43f40d24f083b7ed4151d6e882a86d32c3
Split getpwent and fgetgrent functions in interceptors

Summary:
NetBSD does not ship with fgetpwent_r() and fgetgrent_r().
Split their interceptors from getpwent_r() and getgrent_r()
and disable for this OS.

Installation of supernumerary interceptors causes leaking of
errors to dlsym(3)-like operations.

No functional change for other OSes.

Reviewers: vitalybuka, joerg

Reviewed By: vitalybuka

Subscribers: srhines, kubamracek, fedor.sergeev, llvm-commits, #sanitizers, mgorny

Tags: #sanitizers

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

llvm-svn: 346038
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h