Commit Graph

22 Commits

Author SHA1 Message Date
David Carlier 18a7ebda99 [Sanitizers] intercept md5 and sha* apis on FreeBSD.
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D110989
2021-10-06 06:01:50 +01:00
David Carlier 3675e147a1 [Sanitizers] intercept ttyent api on FreeBSD.
and ttyentpath separately on NetBSD.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D109843
2021-09-24 04:26:05 +01:00
David Carlier 8fdd821aef [Sanitizers] intercept netent, protoent and mincore on FreeBSD.
netent on Linux in addition as well.

Reviewd By: vitalybuka

Differential Revision: https://reviews.llvm.org/D109287
2021-09-10 19:24:51 +01:00
David Carlier 84013d7093 [Sanitizers] wordexp interceptor build fix on FreeBSD.
Reviewers: vitalybuka

Reviewed-By: vitalybuka

Differential Revision: https://reviews.llvm.org/D108838
2021-08-27 23:58:06 +01:00
Dimitry Andric 52f2df1ecd [Sanitizers] Get link map on FreeBSD and NetBSD via documented API
Summary:
Instead of hand-crafting an offset into the structure returned by
dlopen(3) to get at the link map, use the documented API.  This is
described in dlinfo(3): by calling it with `RTLD_DI_LINKMAP`, the
dynamic linker ensures the right address is returned.

This is a recommit of 92e267a94d, with
dlinfo(3) expliclity being referenced only for FreeBSD, non-Android
Linux, NetBSD and Solaris.  Other OSes will have to add their own
implementation.

Reviewers: devnexen, emaste, MaskRay, krytarowski

Reviewed By: krytarowski

Subscribers: krytarowski, vitalybuka, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D73990
2020-02-10 23:43:20 +01:00
Dimitry Andric 480eea4e45 Revert "[Sanitizers] Get link map on FreeBSD via documented API"
This reverts commit 92e267a94d, as it
appears Android is missing dlinfo(3).
2020-02-10 23:26:33 +01:00
Dimitry Andric 92e267a94d [Sanitizers] Get link map on FreeBSD via documented API
Summary:
Instead of hand-crafting an offset into the structure returned by
dlopen(3) to get at the link map, use the documented API.  This is
described in dlinfo(3): by calling it with `RTLD_DI_LINKMAP`, the
dynamic linker ensures the right address is returned.

Reviewers: devnexen, emaste, MaskRay, krytarowski

Reviewed By: krytarowski

Subscribers: krytarowski, vitalybuka, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D73990
2020-02-10 19:21:19 +01:00
Dimitry Andric 924c9030a8 [compiler-rt] clang-format FreeBSD-specific sanitizer sources
Formatting only, no functional change intended.
2020-02-06 22:48:08 +01:00
Dimitry Andric 8a1f4feb1b [compiler-rt] Fix sanitizer_common build for FreeBSD
This was broken by 28c91219c7, which added `struct_stack_t_sz` only to
sanitizer_platform_limits_posix.{cpp,h}.
2020-02-04 22:51:07 +01:00
Vitaly Buka c0fa632236 Remove NOLINTs from compiler-rt
llvm-svn: 371687
2019-09-11 23:19:48 +00:00
Vitaly Buka 48eb4a27d1 Update compiler-rt cpplint.py
adb3500107

llvm-svn: 371675
2019-09-11 21:33:06 +00:00
Ed Maste 1b6ee802c6 compiler-rt: use 64-bit time_t for all FreeBSD archs except i386
At present only i386 has 32-bit time_t on FreeBSD.

Reviewed by:	dim
Differential Revision:	https://reviews.llvm.org/D66758

llvm-svn: 370756
2019-09-03 13:44:47 +00:00
Ed Maste 14cf2b20ca compiler-rt: use more __sanitizer_time_t on FreeBSD
A few structs were using long for time_t members.  NFC.

Reviewed by:	devnexen
Differential Revision:	https://reviews.llvm.org/D66756

llvm-svn: 370755
2019-09-03 13:41:51 +00:00
Nico Weber 4a1a113a99 Remove a few straggler ".cc"s in compiler-rt/lib
llvm-svn: 367589
2019-08-01 17:53:25 +00:00
Chandler Carruth 2946cd7010 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
2019-01-19 08:50:56 +00:00
David Carlier bd27e4c156 [Sanitizer] Intercept sl_add api on FreeBSD/NetBSD
Reviewers: krytarowski, vitalybuka

Reviewed By: krytarowski

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

llvm-svn: 351189
2019-01-15 11:21:33 +00:00
David Carlier 774f7e83c3 [Sanitizer] Add fstab api to FreeBSD/Linux
Interception of /etc/fstab function parsers.

Reviewers: krytarowski, vitalybuka

Reviewed By: krytarowski

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

llvm-svn: 350099
2018-12-27 21:25:24 +00:00
David Carlier 018f505c9e [Sanitizer] Enable FTS api on FreeBSD
Reviewers: krytarowski, vitalybuka

Reviewed By: krytarowski

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

llvm-svn: 350090
2018-12-27 12:56:54 +00:00
David Carlier 58d3823086 [Sanitizer] Enable POSIX regex api on FreeBSD.
Reviewers: krytarowski

Reviewed By: krytarowski

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

M    lib/sanitizer_common/sanitizer_common_interceptors.inc
M    lib/sanitizer_common/sanitizer_platform_interceptors.h
M    lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
M    lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
D    test/sanitizer_common/TestCases/NetBSD/regex.cc
A  + test/sanitizer_common/TestCases/Posix/regex.cc

llvm-svn: 350002
2018-12-22 11:17:27 +00:00
David Carlier 22594ae962 [Sanitizer] Enable vis api on FreeBSD
Reviewers: krytarowski

Reviewed By: krytarowski

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

llvm-svn: 349762
2018-12-20 14:25:43 +00:00
David Carlier 8ec89e6b16 [Sanitizer] Expand FSEEK interception to FreeBSD
Reviewers: krytarowski

Reviewed By: krytarowski

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

llvm-svn: 348888
2018-12-11 19:08:40 +00:00
David Carlier a742193309 Missing freebsd files.
A    lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
A    lib/sanitizer_common/sanitizer_platform_limits_freebsd.h

llvm-svn: 348635
2018-12-07 20:07:49 +00:00