- Feb 03, 2017
-
-
Marcos Pividori authored
When the sanitizer is implemented as a static library and is included in the main executable, we need an auxiliary static library dll_thunk that will be linked to the dlls that have instrumentation, so they can refer to the runtime in the main executable. Basically, it uses interception to get a pointer the function in the main executable and override its function with that pointer. Before this diff, all of the implementation for dll_thunks was included in asan. In this diff I split it into different sanitizers, so we can use other sanitizers regardless of whether we include asan or not. All the sanitizers include a file sanitizer_win_dll_thunk.cc that register functions to be intercepted in the binary section: DLLTH When the dll including dll_thunk is initialized, it will execute __dll_thunk_init() implemented in: sanitizer_common/sanitizer_win_dll_thunk.cc, which will consider all the CB registered in the section DLLTH. So, all the functions registered will be intercepted, and redirected to the implementation in the main executable. All the files "sanitizer_win_dll_thunk.cc" are independent, so we don't need to include a specific list of sanitizers. Now, we compile: asan_win_dll_thunk.cc ubsan_win_dll_thunk.cc, sanitizer_coverage_win_dll_thunk.cc and sanitizer_win_dll_thunk.cc, to generate asan_dll_thunk, because we include asan, ubsan and sanitizer coverage in the address sanitizer library. Differential Revision: https://reviews.llvm.org/D29154 llvm-svn: 293951
-
Bob Haarman authored
Summary: Some compilers, including MSVC and Clang, allow linker options to be specified in source files. In the legacy LTO API, there is a getLinkerOpts() method that returns linker options for the bitcode module being processed. This change adds that method to the new API, so that the COFF linker can get the right linker options when using the new LTO API. Reviewers: pcc, ruiu, mehdi_amini, tejohnson Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D29207 llvm-svn: 293950
-
Eugene Zelenko authored
llvm-svn: 293949
-
Pavel Labath authored
llvm-svn: 293948
-
Rafael Espindola authored
llvm-svn: 293946
-
Reid Kleckner authored
Effectively reverts r290248 and fixes the unused function warning with ifndef NDEBUG. llvm-svn: 293945
-
Craig Topper authored
On one test this seems to have given more chance for DAG combine to do other INSERT_SUBVECTOR/EXTRACT_SUBVECTOR combines before the BLENDI was created. Looks like we can still improve more by teaching DAG combine to optimize INSERT_SUBVECTOR/EXTRACT_SUBVECTOR with BLENDI. llvm-svn: 293944
-
Reid Kleckner authored
This enum has been dead since Olivier Stannard re-implemented ARM byval handling in r202985 (2014). llvm-svn: 293943
-
Zachary Turner authored
This moves the following classes from Core -> Utility. ConstString Error RegularExpression Stream StreamString The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem. Differential Revision: https://reviews.llvm.org/D29427 llvm-svn: 293941
-
Bill Seurer authored
This test fails consistently on Ubuntu 16.xx powerpc64 LE systems. The cause is being investigated and in the meantime disable it so the buildbots can run cleanly. llvm-svn: 293939
-
Xinliang David Li authored
1. Added comments for options 2. Added missing option cl::desc field 3. Uniified function filter option for graph viewing. Now PGO count/raw-counts share the same filter option: -view-bfi-func-name=. llvm-svn: 293938
-
Rafael Espindola authored
llvm-svn: 293937
-
Rafael Espindola authored
On ELF every section can have a corresponding section symbol. When in an assembly file we have .quad .text the '.text' refers to that symbol. The way we used to handle them is to leave .text an undefined symbol until the very end when the object writer would map them to the actual section symbol. The problem with that is that anything before the end would see an undefined symbol. This could result in bad diagnostics (test/MC/AArch64/label-arithmetic-diags-elf.s), or incorrect results when using the asm streamer (est/MC/Mips/expansion-jal-sym-pic.s). Fixing this will also allow using the section symbol earlier for setting sh_link of SHF_METADATA sections. This patch includes a few hacks to avoid changing our behaviour when handling conflicts between section symbols and other symbols. I reported pr31850 to track that. llvm-svn: 293936
-
Javed Absar authored
This is the second in the series of patches to enable adding of machine sched-models for ARM processors easier and compact. This patch focuses on integer instructions and adds missing sched definitions. Reviewers: rovka, rengolin Differential Revision: https://reviews.llvm.org/D29127 llvm-svn: 293935
-
Quentin Colombet authored
In r283838, we added the capability of splitting unspillable register. When doing so we had to make sure the split live-ranges were also unspillable and we did that by marking the related live-ranges in the delegate method that is called when a new vreg is created. However, by accessing the live-range there, we also triggered their lazy computation (LiveIntervalAnalysis::getInterval) which is not what we want in general. Indeed, later code in LiveRangeEdit is going to build the live-ranges this lazy computation may mess up that computation resulting in assertion failures. Namely, the createEmptyIntervalFrom method expect that the live-range is going to be empty, not computed. Thanks to Mikael Holmén <mikael.holmen@ericsson.com> for noticing and reporting the problem. llvm-svn: 293934
-
Krzysztof Parzyszek authored
Patch by Colin LeMahieu. llvm-svn: 293933
-
Michael Kuperstein authored
Differential Revision: https://reviews.llvm.org/D29416 llvm-svn: 293932
-
Krzysztof Parzyszek authored
Patch by Sid Manning. llvm-svn: 293931
-
Vitaly Buka authored
Summary: snprintf returns buffer size needed for printing. If buffer was small, calling code receives incorrectly symbolized buffer and fail. Reviewers: eugenis Subscribers: kubamracek, dberris, kcc Differential Revision: https://reviews.llvm.org/D29440 llvm-svn: 293930
-
Krzysztof Parzyszek authored
Patch by Colin LeMahieu. llvm-svn: 293929
-
Kostya Serebryany authored
[libFuzzer] reorganize the tracing code to make it easier to experiment with inlined coverage instrumentation. NFC llvm-svn: 293928
-
Eric Liu authored
llvm-svn: 293927
-
Dan Albert authored
Summary: num_put::put uses %p for pointer types, but the exact format of %p is implementation defined behavior for the C library. Compare output to snprintf for portability. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D29197 llvm-svn: 293926
-
Krzysztof Parzyszek authored
llvm-svn: 293925
-
Reid Kleckner authored
This reverts commit r293923. It causes test failures on Linux that need time to debug. llvm-svn: 293924
-
Reid Kleckner authored
Summary: The patch updates the MSVC ToolChain for the changes made in Visual Studio 2017[1]. Other notable changes: - Path handling code has been centralised to make potential future changes less painful. - A compiler error is emitted if the driver is unable to locate a usable MSVC toolchain. (Previously it'd fail with a cryptic error such as "link.exe is not executable") - Support for the new Setup Config Server API[2] has been added, albeit block commented out with a preprocessor conditional. This can probably be re-evaluated when the API is officially released (it's currently at the RC stage), but it's left in to make it easy for anyone familiar with the API to give it a go with Clang. Patch by Hamza Sood. [1] https://blogs.msdn.microsoft.com/vcblog/2016/10/07/compiler-tools-layout-in-visual-studio-15/ [2] https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-to-visual-studio-15-setup/ Reviewers: ruiu, hans, rnk Reviewed By: rnk Subscribers: awson, RKSimon, amccarth, cfe-commits Differential Revision: https://reviews.llvm.org/D28365 llvm-svn: 293923 -
Dan Gohman authored
llvm-svn: 293922
-
Xinliang David Li authored
Differential Revision: https://reviews.llvm.org/D29259 llvm-svn: 293921
-
Marcos Pividori authored
Use SetUnhandledExceptionFilter instead of AddVectoredExceptionHandler. According to the documentation on Structured Exception Handling, this is the order for the Exception Dispatching: + If the process is being debugged, the system notifies the debugger. + The Vectored Exception Handler is called. + The system attempts to locate a frame-based exception handler by searching the stack frames of the thread in which the exception occurred. + If no frame-based handler can be found, the UnhandledExceptionFilter filter is called. + Default handling based on the exception type. So, similar to what we do for asan, we should use SetUnhandledExceptionFilter instead of AddVectoredExceptionHandler, so user's code that is being fuzzed can execute frame-based exception handlers before we catch them . We want to catch unhandled exceptions, not all the exceptions. Differential Revision: https://reviews.llvm.org/D29462 llvm-svn: 293920
-
Peter Collingbourne authored
FunctionImport: Remove the -disable-force-link-odr flag and change importFunctions to never force link. This removes some functionality that was only being used by tests. Differential Revision: https://reviews.llvm.org/D29439 llvm-svn: 293919
-
Mehdi Amini authored
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instance a symbol can be referenced outside of the LTO unit, or there can be cross-module reference in ThinLTO. This is a recommit of r293912 after fixing build failures. Differential Revision: https://reviews.llvm.org/D28978 llvm-svn: 293918
-
Simon Pilgrim authored
Requested by @silvas llvm-svn: 293916
-
Nirav Dave authored
This reverts commit r293893 which is miscompiling lua on ARM and bootstrapping for x86-windows. llvm-svn: 293915
-
Mehdi Amini authored
This reverts r293912, bots are broken. llvm-svn: 293914
-
Pavel Labath authored
We started passing the list of libraries to link to the add_lldb_unittest macro, but that macro wasn't actually doing anything with them. Fix that. llvm-svn: 293913
-
Mehdi Amini authored
When a symbol is not exported outside of the DSO, it is can be hidden. Usually we try to internalize as much as possible, but it is not always possible, for instance a symbol can be referenced outside of the LTO unit, or there can be cross-module reference in ThinLTO. Differential Revision: https://reviews.llvm.org/D28978 llvm-svn: 293912
-
Warren Ristow authored
Guard against a null pointer dereference that caused Clang to crash when processing a class containing an _Atomic qualified data member, and that is tagged with 'dllexport'. Differential Revision: https://reviews.llvm.org/D29208 llvm-svn: 293911
-
Pavel Labath authored
Summary: various platforms very using nearly identical code for this method. As far as I can tell there was nothing platform-specific about the differences, but rather it looked like it was caused by tiny tweaks being made to individual copies without affecting the overall functionality. I have taken the superset of all these tweaks and put it into one method in the base class (incidentaly, nobody was using the base class implementation of the method, as all classes were overriding it). From the darwin class I took the slightly improved error reporting (checking whether the file is readable) and the ResolveExecutableInBundle call (which has no effect elsewhere as the function is already a no-op on non-darwin platforms). From the linux class I took the set-the-triple-vendor-to-host-if-unspecified tweak (present in PlatformKalimba as well). PlatformWindows has an identical copy as well. We could resolve that by pushing this code further down into Platform class, that that would require pushing the m_remote_platform_sp member as well, which seems like a bad design choice. Reviewers: clayborg, emaste, krytarowski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29406 llvm-svn: 293910
-
Eric Liu authored
Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D29460 llvm-svn: 293909
-
Teresa Johnson authored
Summary: This is necessary to get stats from the ThinLink printed before the early exit when compiling in a distributed build. Reviewers: mehdi_amini Subscribers: Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D29461 llvm-svn: 293908
-