summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/scripts/asan_device_setup
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | 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
* [asan] Remove malloc_context_size=0 from asan_device_setup.Evgeniy Stepanov2018-04-121-1/+1
| | | | | | | | This line was added in r243679 - [asan] Support arm64 devices in asan_device_setup without any good reason. llvm-svn: 329962
* [asan] Restore asan_device_setup compatibility with older libraries.Evgeniy Stepanov2018-01-021-0/+7
| | | | | | | | | | | | | | | | Summary: This way new asan_device_setup, which knows about the quirks of recent releases of Android, can be used with older ASan runtime library (say, from an NDK release). The library is version locked to the compiler, and is often hard or impossible to update. Reviewers: vitalybuka Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D41679 llvm-svn: 321677
* [asan] Fix asan_device_setup on KitKat.Evgeniy Stepanov2017-11-171-3/+6
| | | | | | "ln" from toybox does not understand -f (force) flag. llvm-svn: 318573
* Remove ld.config.txt for Android O.Evgeniy Stepanov2017-09-051-6/+20
| | | | | | | | | | ld.config.txt defines linker namespaces in a way that is incompatible with ASan. Remove the file when installing ASan on an Android O (8.0.x) device. Patch by Jiyong Park. llvm-svn: 312581
* Reland r311842 - [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove the explicit i686 target that is completely duplicate to the i386 target, with the latter being used more commonly. 1. The runtime built for i686 will be identical to the one built for i386. 2. Supporting both -i386 and -i686 suffixes causes unnecessary confusion on the clang end which has to expect either of them. 3. The checks are based on wrong assumption that __i686__ is defined for all newer x86 CPUs. In fact, it is only declared when -march=i686 is explicitly used. It is not available when a more specific (or newer) -march is used. Curious enough, if CFLAGS contain -march=i686, the runtime will be built both for i386 and i686. For any other value, only i386 variant will be built. Differential Revision: https://reviews.llvm.org/D26764 llvm-svn: 311924
* Revert r311842 - [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-271-1/+1
| | | | | | | The required change in clang is being reverted because of the Android build bot failure. llvm-svn: 311859
* [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove the explicit i686 target that is completely duplicate to the i386 target, with the latter being used more commonly. 1. The runtime built for i686 will be identical to the one built for i386. 2. Supporting both -i386 and -i686 suffixes causes unnecessary confusion on the clang end which has to expect either of them. 3. The checks are based on wrong assumption that __i686__ is defined for all newer x86 CPUs. In fact, it is only declared when -march=i686 is explicitly used. It is not available when a more specific (or newer) -march is used. Curious enough, if CFLAGS contain -march=i686, the runtime will be built both for i386 and i686. For any other value, only i386 variant will be built. Differential Revision: https://reviews.llvm.org/D26764 llvm-svn: 311842
* [asan] Fix asan_device_setup --use-su mode on Android 7.x.Evgeniy Stepanov2017-07-111-1/+1
| | | | | | | mount command does not accept -o remount,rw flag on some versions of Android. mount -o rw,remount works everywhere. llvm-svn: 307685
* [asan] Fix android setup script to overwrite the symlink.Evgeniy Stepanov2017-06-191-3/+3
| | | | | | | This fixes asan_device_setup failing to update an existing asan installation. llvm-svn: 305746
* [compiler-rt] Change default of allow_user_segv_handler to trueVitaly Buka2017-05-251-5/+0
| | | | | | | | | | Reviewers: eugenis Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D32443 llvm-svn: 303842
* Revert "[compiler-rt] Change default of allow_user_segv_handler to true"Vitaly Buka2017-05-241-0/+5
| | | | | | | | Breaks sanitizer-x86_64-linux-fuzzer bot. This reverts commit r303729. llvm-svn: 303795
* [compiler-rt] Change default of allow_user_segv_handler to trueVitaly Buka2017-05-241-5/+0
| | | | | | | | | | Reviewers: eugenis Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D32443 llvm-svn: 303729
* Revert "[compiler-rt] Change default of allow_user_segv_handler to true"Vitaly Buka2017-05-201-0/+5
| | | | | | | | Failed libFuzzer tests on Windows. This reverts commit r303476. llvm-svn: 303481
* [compiler-rt] Change default of allow_user_segv_handler to trueVitaly Buka2017-05-201-5/+0
| | | | | | | | | | Reviewers: eugenis Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D32443 llvm-svn: 303476
* [asan] Fix asan-rt bitness issues in asan_device_setup on Android.Evgeniy Stepanov2016-11-081-9/+18
| | | | | | | | | | | | | asan_device_setup script is using LD_PRELOAD to inject the ASan runtime library into the Zygote process. This breaks when the Zygote or any of its descendants spawn a process with different bitness due to the fact that the ASan-RT library name includes the target architecture. The fix is to preload the library through a symlink which has the same name in lib and lib64. llvm-svn: 286188
* [asan] alloc_dealloc_mismatch=0 by default on Android.Evgeniy Stepanov2016-09-131-3/+1
| | | | | | | All known (to me) Android deployments are disabling this flag anyway. The in-tree script (asan_device_setup) does that, too. llvm-svn: 281410
* [asan] Workaround LD_PRELOAD bug in the Android linker.Evgeniy Stepanov2016-05-241-1/+8
| | | | llvm-svn: 270616
* Check multilib dir for asan_device_setup.Dan Albert2015-12-041-2/+7
| | | | | | | | | | Reviewers: eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15247 llvm-svn: 254789
* [asan] Fix asan_device_setup script on KitKat.Evgeniy Stepanov2015-10-281-0/+2
| | | | | | | | | app_process32, when started via a shell script wrapper, needs a different security context to satisty SELinux. Patch by Abhishek Arya. llvm-svn: 251572
* [asan] Support arm64 devices in asan_device_setup.Evgeniy Stepanov2015-07-301-46/+128
| | | | llvm-svn: 243679
* [asan] Support per-application flags in the Android setup script.Evgeniy Stepanov2015-07-281-0/+1
| | | | llvm-svn: 243494
* [asan] Support 'su' rooted devices in ASan setup script.Evgeniy Stepanov2015-02-161-41/+117
| | | | | | | | | | | | | | | | | Android devices may not support 'adb root', but be rooted with 'su' binary. This patch makes it possible to install ASAN to such devices. When --use-su flag is specified, most 'adb ...' commangs are changed to 'adb su -c "..."'. Some other notes: * 'readlink' changed to 'ls -l', since not all devices have readlink in their firmware. * removing ASan library step moved to very end, because 'su' may not run properly without this library until shell will be restarted. Patch by Dmitry <ripp at yandex-team dot ru>. llvm-svn: 229368
* [asan] Add one more wait-for-device in the Android setup script.Evgeniy Stepanov2015-01-291-0/+1
| | | | llvm-svn: 227473
* [asan] Change detection of allow_user_segv_handler on Android.Evgeniy Stepanov2015-01-161-1/+1
| | | | llvm-svn: 226273
* [asan] Minor tweak to asan_device_setup.Evgeniy Stepanov2014-10-061-1/+2
| | | | | | | Add another wait-for-device which may fix a flaky setup error. Fix output message. llvm-svn: 219117
* [asan] Support Android/x86 in asan_device_setup.Evgeniy Stepanov2014-10-031-13/+28
| | | | llvm-svn: 218968
* [sanitizer] Android build cleanup.Evgeniy Stepanov2014-09-291-2/+2
| | | | | | | | | | | | * Detect Android toolchain target arch and set correct runtime library name. * Merged a lot of Android and non-Android code paths. * Android is only supported in standalone build of compiler-rt now. * Linking lsan-common in ASan-Android (makes lsan annotations work). * Relying on -fsanitize=address linker flag when building tests (again, unification with non-Android path). * Runtime library moved from lib/asan to lib/linux. llvm-svn: 218605
* [asan] Fix SELinux setup on Android-K.Evgeniy Stepanov2014-09-291-2/+27
| | | | | | | On pre-L devices SELinux is set up in such a way that zygote wrapper has to be in system_file context, not zygote_exec. llvm-svn: 218599
* [asan] asan_device_setup improvements.Evgeniy Stepanov2014-09-191-1/+14
| | | | | | | | * Allow user SEGV handler if Android-L-like setup is detected. Necessary for correctness. * Change file context labels on the wrapper script to appease SELinux. llvm-svn: 218124
* [asan] Preserve existing LD_PRELOAD setting on Android.Evgeniy Stepanov2014-09-111-1/+1
| | | | llvm-svn: 217584
* [asan] Update asan_device_setup to support Android L Preview.Evgeniy Stepanov2014-09-011-23/+42
| | | | llvm-svn: 216884
* [asan] asan_device_setup: extend search pathEvgeniy Stepanov2014-06-051-2/+2
| | | | | | In standalone build asan-rt is stored in yet another path. llvm-svn: 210259
* [asan] asan_device_setup: fix a typo in usage textEvgeniy Stepanov2014-02-261-2/+2
| | | | llvm-svn: 202246
* [asan] Remove .sh extension from asan_device_setup.Evgeniy Stepanov2014-02-261-0/+194
llvm-svn: 202245
OpenPOWER on IntegriCloud