| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the sha2 interceptor macros to use a constant for array parameter
length rather than referencing the extern variable. Since the digest
length is provided in hash name, reuse the macro parameter for it.
Verify that the calculated value matches the one provided by system
headers.
Differential Revision: https://reviews.llvm.org/D55811
llvm-svn: 349645
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I tricked myself into thinking that deadlock detection is off by default in TSan by looking at the default value of the detect_deadlocks flag and outdated docs. (Created a pull request to update docs.)
I even managed to confuse others: https://groups.google.com/forum/#!topic/thread-sanitizer/xYvnAYwtoDk
However, the default value is overwritten in code (TSan_flags.cc:InitializeFlags). The TSan/deadlock tests also rely on this
This changes aligns the default value of the flag with the actual default behavior.
Author: yln (Julian Lettner)
Reviewed in: https://reviews.llvm.org/D55846
llvm-svn: 349609
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interceptor.
Summary:
This fixes the `ThreadSanitizer-x86_64-iossim` testsuite which broke
when r348770 (https://reviews.llvm.org/D55473) landed.
The root cause of the problem is that early-on during the iOS simulator
init process a call to `sysctlbyname` is issued. If the TSan initializer
is triggered at this point it will eventually trigger a call to
`__cxa_at_exit(...)`. This call then aborts because the library
implementing this function is not yet had its initialization function
called.
rdar://problem/46696934
Reviewers: kubamracek, george.karpenkov, devnexen, vitalybuka, krytarowski
Subscribers: #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D55711
llvm-svn: 349402
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: markj, vitalybuka
Reviewed By: markj
Differential Revision: https://reviews.llvm.org/D55714
llvm-svn: 349392
|
|
|
|
| |
llvm-svn: 349262
|
|
|
|
|
|
| |
This is a follow up of a similar fix for Linux from D55692.
llvm-svn: 349257
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`FlatByteMap`, and `TwoLevelByteMap`.
Summary:
This is a follow up patch to r346956 for the `SizeClassAllocator32`
allocator.
This patch makes `AddressSpaceView` a template parameter both to the
`ByteMap` implementations (but makes `LocalAddressSpaceView` the
default), some `AP32` implementations and is used in `SizeClassAllocator32`.
The actual changes to `ByteMap` implementations and
`SizeClassAllocator32` are very simple. However the patch is large
because it requires changing all the `AP32` definitions, and users of
those definitions.
For ASan and LSan we make `AP32` and `ByteMap` templateds type that take
a single `AddressSpaceView` argument. This has been done because we will
instantiate the allocator with a type that isn't `LocalAddressSpaceView`
in the future patches. For the allocators used in the other sanitizers
(i.e. HWAsan, MSan, Scudo, and TSan) use of `LocalAddressSpaceView` is
hard coded because we do not intend to instantiate the allocators with
any other type.
In the cases where untemplated types have become templated on a single
`AddressSpaceView` parameter (e.g. `PrimaryAllocator`) their name has
been changed to have a `ASVT` suffix (Address Space View Type) to
indicate they are templated. The only exception to this are the `AP32`
types due to the desire to keep the type name as short as possible.
In order to check that template is instantiated in the correct a way a
`static_assert(...)` has been added that checks that the
`AddressSpaceView` type used by `Params::ByteMap::AddressSpaceView` matches
the `Params::AddressSpaceView`. This uses the new `sanitizer_type_traits.h`
header.
rdar://problem/45284065
Reviewers: kcc, dvyukov, vitalybuka, cryptoad, eugenis, kubamracek, george.karpenkov
Subscribers: mgorny, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D54904
llvm-svn: 349138
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: kubamracek, vitalybuka
Reviewed By: vitalybuka
Subscribers: delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D55692
llvm-svn: 349134
|
|
|
|
|
|
|
|
| |
Breaks sanitizer-android buildbot.
This reverts commit 85e02baff327e7b67ea5b47897302901abb2aa5d.
llvm-svn: 349093
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sanitizer_common so we can avoid depending on system C++ headers.
Summary:
In particular we implement the `is_same<T,U>` templated type. This is
useful for doing compile-time comparison of types in `static_assert`s.
The plan is to use this in another patch (
https://reviews.llvm.org/D54904 ).
Reviewers: kcc, dvyukov, vitalybuka, cryptoad, eugenis, kubamracek, george.karpenkov
Subscribers: mgorny, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D54951
llvm-svn: 349077
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: vitalybuka, krytarowski, emaste
Reviewed By: emaste
Differential Revision: https://reviews.llvm.org/D55622
llvm-svn: 349042
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
cdb - formats of the constant database.
cdbr, cdbr_open, cdbr_open_mem, cdbr_entries, cdbr_get, cdbr_find,
cdbr_close - constant database access methods.
cdbw_open, cdbw_put, cdbw_put_data, cdbw_put_key, cdbw_stable_seeder,
cdbw_output, cdbw_close - creates constant databases.
Add a dedicated test for this API.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D55167
llvm-svn: 349021
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add interceptors for the NetBSD style of vis(3) present inside libc:
- vis
- nvis
- strvis
- stravis
- strnvis
- strvisx
- strnvisx
- strenvisx
- svis
- snvis
- strsvis
- strsnvis
- strsvisx
- strsnvisx
- strsenvisx
- unvis
- strunvis
- strnunvis
- strunvisx
- strnunvisx
Add a dedicated test verifying the installed interceptors.
Based on original work by Yang Zheng.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54594
llvm-svn: 349018
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The TLS_SLOT_TSAN slot is available starting in N, but its location (8)
is incompatible with the proposed solution for implementing ELF TLS on
Android (i.e. bump ARM/AArch64 alignment to reserve an 8-word TCB).
Instead, starting in Q, Bionic replaced TLS_SLOT_DLERROR(6) with
TLS_SLOT_SANITIZER(6). Switch compiler-rt to the new slot.
Reviewers: eugenis, srhines, enh
Reviewed By: eugenis
Subscribers: ruiu, srhines, kubamracek, javed.absar, kristof.beyls, delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D55581
llvm-svn: 348984
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: krytarowski
Reviewed By: krytarowski
Differential Revision: https://reviews.llvm.org/D55556
llvm-svn: 348888
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: vitalybuka, krytarowski, kubamracek
Reviewed By: vitalybuka, krytarowski
Differential Revision: https://reviews.llvm.org/D55473
llvm-svn: 348770
|
|
|
|
|
|
| |
Missing part of D55469.
llvm-svn: 348747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
SHA224_Init, SHA224_Update, SHA224_Final, SHA224_End, SHA224_File,
SHA224_FileChunk, SHA224_Data, SHA256_Init, SHA256_Update, SHA256_Final,
SHA256_End, SHA256_File, SHA256_FileChunk, SHA256_Data, SHA384_Init,
SHA384_Update, SHA384_Final, SHA384_End, SHA384_File, SHA384_FileChunk,
SHA384_Data, SHA512_Init, SHA512_Update, SHA512_Final, SHA512_End,
SHA512_File, SHA512_FileChunk, SHA512_Data – calculates the NIST Secure
Hash Standard (version 2)
Add tests for new interceptors.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54987
llvm-svn: 348745
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
MD2Init, MD2Update, MD2Final, MD2End, MD2File, MD2Data - calculates the
RSA Data Security, Inc., "MD2" message digest.
Add a dedicated test.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D55469
llvm-svn: 348744
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add new interceptors for a set of functions to reposition a stream:
fgetpos, fseek, fseeko, fsetpos, ftell, ftello, rewind .
Add a dedicated test.
Enable this interface on NetBSD.
Reviewers: joerg, vitalybuka
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D55471
llvm-svn: 348743
|
|
|
|
|
|
|
| |
Undefining INLINE breaks the build.
The invalid change in this file has been overlooked in D55386.
llvm-svn: 348680
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
MD5Init, MD5Update, MD5Final, MD5End, MD5File, MD5Data - calculates the
RSA Data Security, Inc., "MD5" message digest.
Add a dedicated test.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54993
llvm-svn: 348679
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
RMD160Init, RMD160Update, RMD160Final, RMD160Transform, RMD160End,
RMD160File, RMD160Data - calculates the ``RIPEMD-160'' message digest.
Add a dedicated test for this API.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54991
llvm-svn: 348678
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
MD4Init, MD4Update, MD4Final, MD4End, MD4File, MD4Data - calculates the
RSA Data Security, Inc., "MD4" message digest.
Add dedicated test.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54990
llvm-svn: 348677
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add interceptors for:
- SHA1Init
- SHA1Update
- SHA1Final
- SHA1Transform
- SHA1End
- SHA1File
- SHA1FileChunk
- SHA1Data
Add a dedicated regression test for this API.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: mgorny, llvm-commits, kubamracek, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54927
llvm-svn: 348676
|
|
|
|
| |
llvm-svn: 348673
|
|
|
|
| |
llvm-svn: 348672
|
|
|
|
| |
llvm-svn: 348669
|
|
|
|
|
|
|
|
|
|
|
|
| |
- For the moment a subset of this api dealing with file descriptors permissions and ioctls.
Reviewers: vitalybuka, krytarowski
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D55368
llvm-svn: 348668
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
statvfs1, fstatvfs1 - get file system statistics.
While there, use file descriptor related macros in the fstatvfs interceptor.
Add a dedicated test.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: dvyukov, kubamracek, mgorny, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D55031
llvm-svn: 348656
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
fparseln - returns the next logical line from a stream.
Add a dedicated test for this API.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D55019
llvm-svn: 348654
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
strtonum(3) reliably convertss string value to an integer.
This function is used in OpenBSD compat namespace
and is located inside NetBSD's libc.
Add a dedicated test for this interface.
It's a reworked version of the original code by Yang Zheng.
Reviewers: joerg, vitalybuka
Reviewed By: vitalybuka
Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54527
llvm-svn: 348651
|
|
|
|
|
|
|
| |
A lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc
A lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
llvm-svn: 348635
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: vitalybuka, krytarowski
Reviewed By: krytarowski
Differential Revision: https://reviews.llvm.org/D55386
llvm-svn: 348634
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: krytarowski
Reviewed By: krytarowski
Differential Revision: https://reviews.llvm.org/D55354
llvm-svn: 348500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASan malloc zone. This API will be used for testing in future patches.
Summary:
The name of the function is based on `malloc_default_zone()` found
in Darwin's `malloc/malloc.h` header file.
Reviewers: kubamracek, george.karpenkov
Subscribers: #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D55064
llvm-svn: 348481
|
|
|
|
|
|
| |
M lib/sanitizer_common/sanitizer_platform_interceptors.h
llvm-svn: 348377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
modctl - controls loadable kernel modules.
Skip tests as this call uses privileged operations.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D55025
llvm-svn: 348370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
nl_langinfo - gets locale information.
Add a dedicated test.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D55015
llvm-svn: 348369
|
|
|
|
|
|
|
|
|
|
| |
NetBSD 8.99.26 changed the layout of internal structure
returned by dlopen(3), switch to it.
Set new values for amd64 and i386 based on the results
of &((struct Struct_Obj_Entry*)0)->linkmap.
llvm-svn: 348329
|
|
|
|
| |
llvm-svn: 348295
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Distringuish what FreeBSD/NetBSD can and NetBSD specifics.
- Fixing page size value collection.
Reviewers: krytarowski, vitalybuka
Reviewed By: krytarowski
Differential Revision: https://reviews.llvm.org/D55265
llvm-svn: 348293
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously we weren't testing this function in the unit tests.
Reviewers: kcc, cryptoad, dvyukov, eugenis, kubamracek
Subscribers: #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D54861
llvm-svn: 348260
|
|
|
|
|
|
|
|
|
| |
This finishes the soft-transition to the new primitive that implements
priority inheritance.
Differential Revision: https://reviews.llvm.org/D55244
llvm-svn: 348236
|
|
|
|
|
|
|
|
|
| |
The res returned value might differ with REAL(strlen)(errbuf) + 1,
as the buffer's value is limited with errbuf_size.
Hot fix for D54584.
llvm-svn: 348231
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add new interceptors for:
- sysctl
- sysctlbyname
- sysctlgetmibinfo
- sysctlnametomib
- asysctl
- asysctlbyname
Cover the API with a new test file TestCases/NetBSD/sysctl.cc.
Reviewers: joerg, vitalybuka
Reviewed By: vitalybuka
Subscribers: devnexen, kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54076
llvm-svn: 348228
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
fts(3) is API to traverse a file hierarchy.
Cover this interface with interceptors.
Add a test to validate the interface reading
the number of regular files in /etc.
Based on original work by Yang Zheng.
Reviewers: joerg, vitalybuka
Reviewed By: vitalybuka
Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54247
llvm-svn: 348227
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add interceptors for the NetBSD style of regex(3) present inside libc:
- regcomp
- regexec
- regerror
- regfree
- regnsub
- regasub
Add a dedicated test verifying the installed interceptors.
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D54584
llvm-svn: 348224
|
|
|
|
|
|
|
|
|
| |
This function seems to be no longer used by compiler-rt
libraries
Differential revision: https://reviews.llvm.org/D55123
llvm-svn: 348140
|