| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
and related changes
https://llvm.org/svn/llvm-project/compiler-rt/trunk@291068
llvm-svn: 291141
|
|
|
|
| |
llvm-svn: 291089
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
At this point SANCOV_OPTIONS are not functional but it is our intent
to move here sanitizer coverage flags from various sanitizers _OPTIONS.
Reviewers: kcc
Subscribers: kubabrecka, mgorny
Differential Revision: https://reviews.llvm.org/D28311
llvm-svn: 291068
|
|
|
|
| |
llvm-svn: 291062
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A previous fix used __assume(0), but not all compilers know that control will
not pass that. This patch uses a macro which works in more compilers.
Reviewers: rnk
Subscribers: kubabrecka
Differential Revision: https://reviews.llvm.org/D28268
llvm-svn: 291042
|
|
|
|
| |
llvm-svn: 290632
|
|
|
|
| |
llvm-svn: 290629
|
|
|
|
|
|
|
|
|
|
|
|
| |
asan to sanitizer_common.
Reviewers: eugenis
Subscribers: kubabrecka, dberris, llvm-commits
Differential Revision: https://reviews.llvm.org/D28074
llvm-svn: 290626
|
|
|
|
|
|
|
|
|
|
| |
they're not available.
This allows compiler-rt to be built on older macOS SDKs, where there symbols are not defined.
Patch by Jeremy Huddleston Sequoia <jeremyhu@apple.com>.
llvm-svn: 290521
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: eugenis
Subscribers: kubabrecka, dberris, llvm-commits
Differential Revision: https://reviews.llvm.org/D28072
llvm-svn: 290396
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: We setup these interceptors twice which hangs test on windows.
Reviewers: eugenis
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D28070
llvm-svn: 290393
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
According https://reviews.llvm.org/D27659#625093 WRAP adds confusing stack
frame.
Reviewers: eugenis
Subscribers: kubabrecka, llvm-commits
Differential Revision: https://reviews.llvm.org/D28039
llvm-svn: 290382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Make thread local quarantine size an option so it can be turned off to save memory.
Reviewers: eugenis
Patch by Alex Shlyapnikov.
Subscribers: kubabrecka, llvm-commits
Differential Revision: https://reviews.llvm.org/D28027
llvm-svn: 290373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
After rL289878/rL289881, the build on FreeBSD is broken, because
sanitizer_platform_limits_posix.cc attempts to include <utmp.h> and use
`struct utmp`, neither of which are supported anymore on FreeBSD.
Fix this by adding `&& !SANITIZER_FREEBSD` in a few places, and stop
intercepting utmp functions altogether for FreeBSD.
Reviewers: kubabrecka, emaste, eugenis, ed
Subscribers: ed, llvm-commits
Differential Revision: https://reviews.llvm.org/D27902
llvm-svn: 290167
|
|
|
|
|
|
| |
Intercept getutent and friends).
llvm-svn: 289881
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D27791
llvm-svn: 289878
|
|
|
|
|
|
|
|
| |
Wu (https://reviews.llvm.org/D27659)"
It breaks programs on Mac. See comments on the code review for details.
llvm-svn: 289864
|
|
|
|
|
|
|
|
|
|
| |
projects/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc:142:2: warning: extra ';' [-Wpedantic]
}; // namespace
^
Identified by gcc 6.
llvm-svn: 289851
|
|
|
|
| |
llvm-svn: 289835
|
|
|
|
|
|
| |
(https://reviews.llvm.org/D27659)
llvm-svn: 289690
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I atually had an integer overflow on 32-bit with D27428 that didn't reproduce
locally, as the test servers would manage allocate addresses in the 0xffffxxxx
range, which led to some issues when rounding addresses.
At this point, I feel that Scudo could benefit from having its own combined
allocator, as we don't get any benefit from the current one, but have to work
around some hurdles (alignment checks, rounding up that is no longer needed,
extraneous code).
Reviewers: kcc, alekseyshl
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D27681
llvm-svn: 289572
|
|
|
|
| |
llvm-svn: 289568
|
|
|
|
|
|
|
|
| |
Subscribers: kubabrecka, mgorny
Differential Revision: https://reviews.llvm.org/D26758
llvm-svn: 289498
|
|
|
|
| |
llvm-svn: 289449
|
|
|
|
|
|
|
|
|
|
| |
malloc_zones[0]
In certain OS versions, it was possible that libmalloc replaced the sanitizer zone from being the default zone (i.e. being in malloc_zones[0]). This patch introduces a failsafe that makes sure we always stay the default zone. No testcase for this, because this doesn't reproduce under normal circumstances.
Differential Revision: https://reviews.llvm.org/D27083
llvm-svn: 289376
|
|
|
|
|
|
|
|
| |
We currently have a interceptor for malloc_create_zone, which returns a new zone that redirects all the zone requests to our sanitizer zone. However, calling malloc_destroy_zone on that zone will cause libmalloc to print out some warning messages, because the zone is not registered in the list of zones. This patch handles this and adds a testcase for that.
Differential Revision: https://reviews.llvm.org/D27083
llvm-svn: 289375
|
|
|
|
|
|
|
|
| |
Subscribers: kubabrecka
Differential Revision: https://reviews.llvm.org/D27605
llvm-svn: 289180
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: I see crashes on this check when some reports are being generated.
Reviewers: eugenis
Subscribers: kubabrecka, llvm-commits
Differential Revision: https://reviews.llvm.org/D27574
llvm-svn: 289145
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The combined allocator rounds up the requested size with regard to the
alignment, which makes sense when being serviced by the primary as it comes
with alignment guarantees, but not with the secondary. For the rare case of
large alignments, it wastes memory, and entices unnecessarily large fields for
the Scudo header. With this patch, we pass the non-alignement-rounded-up size
to the secondary, and adapt the Scudo code for this change.
Reviewers: alekseyshl, kcc
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D27428
llvm-svn: 289088
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The function computes full module name and coverts pc into offset.
Reviewers: kcc
Subscribers: kubabrecka
Differential Revision: https://reviews.llvm.org/D26820
llvm-svn: 288711
|
|
|
|
|
|
|
|
|
|
|
|
| |
TSan runtime shouldn't contain memset, so internal_memset is used
instead and syntax that emits memset is avoided.
This doesn't fail in-tree due to TSan being build with -03, but it fails
when TSan is built with -O0, and is (I think) a true positive.
Patch by Sam McCall, review: https://reviews.llvm.org/D27407
llvm-svn: 288672
|
|
|
|
|
|
|
|
|
|
| |
waiting for user input
On macOS, we often symbolicate using atos (when llvm-symbolizer is not found). The current way we invoke atos involves creating a pseudo-terminal to make sure atos doesn't buffer its output. This however also makes atos think that it's stdin is interactive and in some error situations it will ask the user to enter some input instead of just printing out an error message. For example, when Developer Mode isn't enabled on a machine, atos cannot examine processes, and it will ask the user to enter an administrator's password, which will make the sanitized process get stuck. This patch only connects the pseudo-terminal to the stdout of atos, and uses a regular pipe as its stdin.
Differential Revision: https://reviews.llvm.org/D27239
llvm-svn: 288624
|
|
|
|
|
|
|
|
|
|
| |
When we enumerate loaded modules, we only track the module name and base address, which then has several problems on macOS. Dylibs and executables often have several architecture slices and not storing which architecture/UUID is actually loaded creates problems with symbolication: A file path + offset isn't enough to correctly symbolicate, since the offset can be valid in multiple slices. This is especially common for Haswell+ X86_64 machines, where x86_64h slices are preferred, but if one is not available, a regular x86_64 is loaded instead. But the same issue exists for i386 vs. x86_64 as well.
This patch adds tracking of arch and UUID for each LoadedModule. At this point, this information isn't used in reports, but this is the first step. The goal is to correctly identify which slice is loaded in symbolication, and also to output this information in reports so that we can tell which exact slices were loaded in post-mortem analysis.
Differential Revision: https://reviews.llvm.org/D26632
llvm-svn: 288537
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D27301
llvm-svn: 288488
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The current code was sometimes attempting to release huge chunks of
memory due to undesired RoundUp/RoundDown interaction when the requested
range is fully contained within one memory page.
Reviewers: eugenis
Subscribers: kubabrecka, llvm-commits
Patch by Aleksey Shlyapnikov.
Differential Revision: https://reviews.llvm.org/D27228
llvm-svn: 288271
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In order to avoid starting a separate thread to return unused memory to
the system (the thread interferes with process startup on Android,
Zygota waits for all threads to exit before fork, but this thread never
exits), try to return it right after free.
Reviewers: eugenis
Subscribers: cryptoad, filcab, danalbert, kubabrecka, llvm-commits
Patch by Aleksey Shlyapnikov.
Differential Revision: https://reviews.llvm.org/D27003
llvm-svn: 288091
|
|
|
|
|
|
|
|
|
|
|
| |
is involved.
See D19555 for rationale. As it turns out, this treatment is also necessary
for scanf/printf.
Differential Revision: https://reviews.llvm.org/D27118
llvm-svn: 288064
|
|
|
|
|
|
|
|
| |
Handling SIGILL on Darwin works fine, so let's just make this feature work and re-enable the ill.cc testcase.
Differential Revision: https://reviews.llvm.org/D27141
llvm-svn: 287959
|
|
|
|
|
|
|
|
| |
This patch prints out all CPU registers after a SIGSEGV. These are available in the signal handler context. Only implemented for Darwin. Can be turned off with the dump_registers flag.
Differential Revision: https://reviews.llvm.org/D11365
llvm-svn: 287957
|
|
|
|
|
|
|
|
|
|
| |
1. Mac does not have MAP_32BIT.
Define it to 0 if it is not defined.
2. We are lacking nolibc stub for ListOfModules::init.
Add it.
llvm-svn: 287634
|
|
|
|
|
|
|
|
|
|
| |
/proc/self/maps can't be read atomically, this leads to episodic
crashes in libignore as it thinks that a module is loaded twice.
See the new test for an example.
dl_iterate_phdr does not have this problem.
Switch libignore to dl_iterate_phdr.
llvm-svn: 287632
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The new name better corresponds to its logic.
Reviewers: kcc
Subscribers: kubabrecka
Differential Revision: https://reviews.llvm.org/D26821
llvm-svn: 287377
|
|
|
|
|
|
|
|
| |
Subscribers: kubabrecka
Differential Revision: https://reviews.llvm.org/D26755
llvm-svn: 287268
|
|
|
|
|
|
|
|
| |
Subscribers: kubabrecka
Differential Revision: https://reviews.llvm.org/D26756
llvm-svn: 287144
|
|
|
|
|
|
|
|
| |
Subscribers: kubabrecka
Differential Revision: https://reviews.llvm.org/D26707
llvm-svn: 287078
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
ASan needs to initialize before ucrtbase.dll so that it can intercept
all of its heap allocations. New versions of dbghelp.dll depend on
ucrtbase.dll, which means both of those DLLs will initialize before the
dynamic ASan runtime. By lazily loading dbghelp.dll with LoadLibrary, we
avoid the issue.
Eventually, I would like to remove our dbghelp.dll dependency in favor
of always using llvm-symbolizer.exe, but this seems like an acceptable
interim solution.
Fixes PR30903
Reviewers: etienneb
Subscribers: kubabrecka, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D26473
llvm-svn: 286848
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In non-strict mode we will check memory access for both strings from beginning
to either:
1. 0-char
2. size
3. different chars
In strict mode we will check from beginning to either:
1. 0-char
2. size
Previously in strict mode we always checked up to the 0-char.
Reviewers: kcc, eugenis
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D26574
llvm-svn: 286708
|
|
|
|
|
|
| |
Add a test for it.
llvm-svn: 286608
|
|
|
|
|
|
|
|
| |
Now that we use TerminateProcess, the debugger doesn't stop on program
exit. Add this breakpoint so that the debugger stops after asan reports
an error and is prepared to exit the program.
llvm-svn: 286501
|
|
|
|
|
|
| |
chunks_ array while iterating over it. A test is hard to create, but I've added a consistency check that fires w/o the fix on existing tests. The bug analysis and the initial patch were provided by Pierre Bourdon
llvm-svn: 286478
|