- Jul 17, 2020
-
-
Kai Luo authored
-
Marco Elver authored
This adds option -tsan-compound-read-before-write to emit different instrumentation for the write if the read before that write is omitted from instrumentation. The default TSan runtime currently does not support the different instrumentation, and the option is disabled by default. Alternative runtimes, such as the Kernel Concurrency Sanitizer (KCSAN) can make use of the feature. Indeed, the initial motivation is for use in KCSAN as it was determined that due to the Linux kernel having a large number of unaddressed data races, it makes sense to improve performance and reporting by distinguishing compounded operations. E.g. the compounded instrumentation is typically emitted for compound operations such as ++, +=, |=, etc. By emitting different reports, such data races can easily be noticed, and also automatically bucketed differently by CI systems. Reviewed By: dvyukov, glider Tags: #llvm Differential Revision: https://reviews.llvm.org/D83867
-
Rainer Orth authored
[compiler-rt][asan][hwasan] Refactor shadow setup into sanitizer_common (NFCI) <https://reviews.llvm.org/D83247> broke the Solaris/sparcv9 <http://lab.llvm.org:8014/builders/clang-solaris11-sparcv9/builds/6623> build: FAILED: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.sparcv9.dir/asan_linux.cpp.o /opt/llvm-buildbot/bin/c++ -D_DEBUG -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/asan -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan -Iinclude -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/include -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/include/llvm/Support/Solaris -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++14 -Wno-unused-parameter -O3 -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -Wno-non-virtual-dtor -fno-rtti -UNDEBUG -std=c++14 -MD -MT projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.sparcv9.dir/asan_linux.cpp.o -MF projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.sparcv9.dir/asan_linux.cpp.o.d -o projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.sparcv9.dir/asan_linux.cpp.o -c /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/asan_linux.cpp /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/asan_linux.cpp: In function ‘__sanitizer::uptr __asan::FindDynamicShadowStart()’: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/asan_linux.cpp:103:28: error: ‘MemToShadowSize’ was not declared in this scope uptr shadow_size_bytes = MemToShadowSize(kHighMemEnd); ^~~~~~~~~~~~~~~ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/asan_linux.cpp:103:28: note: suggested alternative: ‘MemToShadow’ uptr shadow_size_bytes = MemToShadowSize(kHighMemEnd); ^~~~~~~~~~~~~~~ MemToShadow Fixed by also definining `MemToShadowSize` in `compiler-rt/lib/asan/asan_mapping_sparc64.h`. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D84004
-
Simon Wallis authored
Summary: [ARM] halfword store hits llvm_unreachable with big-endian Provide missing case in getFixupKindContainerSizeBytes(). This stops execution reaching llvm_unreachable("Unknown fixup kind!") D83947 Reviewers: olista01, ostannard Reviewed By: ostannard Subscribers: ostannard, kristof.beyls, hiraditya, danielkiss, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83947 Change-Id: I598aa1fb51fd1c6f424c557c85d6df6d1958bc62 -
Raphael Isemann authored
Summary: Currently the frame recognizers are stored in a global list (the list in the StackFrameRecognizersManagerImpl singleton to be precise). All commands and plugins that modify the list are just modifying that global list of recognizers which is shared by all Target and Debugger instances. This is clearly against the idea of LLDB being usable as a library and it also leads to some very obscure errors as now multiple tests are sharing the used frame recognizers. For example D83400 is currently failing as it reorders some test_ functions which permanently changes the frame recognizers of all debuggers/targets. As all frame recognizers are also initialized in a 'once' guard, it's also impossible to every restore back the original frame recognizers once they are deleted in a process. This patch just moves the frame recognizers into the current target. This seems the way everyone assumes the system works as for example the assert frame recognizers is using the current target to find the function/so-name to look for (which only works if the recognizers are stored in the target). Reviewers: jingham, mib Reviewed By: jingham, mib Subscribers: MrHate, JDevlieghere Differential Revision: https://reviews.llvm.org/D83757
-
Siva Chandra Reddy authored
-
Vitaly Buka authored
-
Vitaly Buka authored
Works with D34797
-
Max Kazantsev authored
``` define i32 @test(i1 %cond) { entry: br i1 %cond, label %exit, label %exit exit: %result = select i1 %cond, i32 123, i32 456 ret i32 %result } ``` In this test, after applying transformation of replacing select with Phis, the result will be: ``` define i32 @test(i1 %cond) { entry: br i1 %cond, label %exit, label %exit exit: %result = i32 phi [123, %exit], [123, %exit] ret i32 %result } ``` That is, select is transformed into an invalid Phi, which will then be reduced to 123 and the second value will be lost. But it is worth noting that this problem will arise only if select is in the InstCombine worklist will be before the branch. Otherwise, InstCombine will replace the branch condition with false and transformation will not be applied. The fix is to check the target labels in the branch condition for equality. Patch By: Kirill Polushin Differential Revision: https://reviews.llvm.org/D84003 Reviewed By: mkazantsev -
Igor Kudrin authored
For now, DIEExpr is used only in two places: 1) in the debug info library unit test suite to emit a DW_AT_str_offsets_base attribute with the DW_FORM_sec_offset form, see dwarfgen::DIE::addStrOffsetsBaseAttribute(); 2) in DwarfCompileUnit::addLocationAttribute() to generate the location attribute for a TLS variable. The later case used an incorrect DWARF form of DW_FORM_udata, which implies storing an uleb128 value, not a 4/8 byte constant. The generated result was as expected because DIEExpr::SizeOf() did not handle the used form, but returned the size of the code pointer by default. The patch fixes the issue by using more appropriate DWARF forms for the problematic case and making DIEExpr::SizeOf() more straightforward. Differential Revision: https://reviews.llvm.org/D83958 -
Raphael Isemann authored
Summary: When we try to find the executable module for our target we don't check if we already have an executable module set. This causes that when debugging a program that dlopens another executable, LLDB will take that other executable as the new executable of the target (which causes that future launches of the target will launch the dlopen'd executable instead of the original executable). This just adds a check that we only set the executable when we haven't already found one. Fixes rdar://63443099 Reviewers: jasonmolenda, jingham, teemperor Reviewed By: jasonmolenda, teemperor Subscribers: jingham, JDevlieghere Differential Revision: https://reviews.llvm.org/D80724
-
Craig Topper authored
I meant to do this in D83913, but missed it while updating the feature list. Interestingly I think this is disabling the postRA scheduler. But it does match our default 64-bit behavior. Reviewed By: echristo Differential Revision: https://reviews.llvm.org/D83996
-
Craig Topper authored
We use a SmallString<512> and attempted to reserve enough space for CPU plus Features, but that doesn't account for all the things that get added to the string. Reorder the string so the shortest things go first which shouldn't exceed the small size. Finally add the feature string at the end which might be long. This should ensure at most one heap allocation without needing to use reserve. I don't know if this matters much in practice, but I was looking into something else that will require more code here and noticed the odd reserve call.
-
Jonas Devlieghere authored
This fixes the modules build.
-
Juneyoung Lee authored
This patch adds support for noundef arguments. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D83752
-
Juneyoung Lee authored
-
Xing GUO authored
-
Logan Smith authored
-
Logan Smith authored
-
Juneyoung Lee authored
Make explicit that freeze does not touch paddings of an aggregate. (Relevant comment: https://reviews.llvm.org/D83752#2152550) This implies that `v = freeze(load p); store v, q` may still leave undef bits or poison in memory if `v` is an aggregate, but it still happens for non-byte integers such as i1. Differential Revision: https://reviews.llvm.org/D83927
-
Carl Ritson authored
When SCC is dead, but VCC is required then replace s_and / s_andn2 with s_mov into VCC when mask value is 0 or -1. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D83850
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Richard Smith authored
This causes binaries linked with this runtime to crash on startup if dlsym uses any of the intercepted functions. (For example, that happens when using tcmalloc as the allocator: dlsym attempts to allocate memory with malloc, and tcmalloc uses strncmp within its implementation.) Also revert dependent commit "[libFuzzer] Disable implicit builtin knowledge about memcmp-like functions when -fsanitize=fuzzer-no-link is given." This reverts commit f78d9fce and 12d1124c.
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Min-Yih Hsu authored
Similar to the reason behind moving __llvm_profile_filename into a separate file[1]. When users try to use Full LTO with BFD linker to generate IR level PGO profile, the __llvm_profile_raw_version variable, which is used for marking instrumentation level, generated by frontend would somehow conflict with the weak symbol provided by profiling runtime. In most of the cases, BFD linkers will pick profiling runtime's weak symbol as the real definition and thus generate the incorrect instrumentation level metadata in the final executables. Moving __llvm_profile_raw_version into a separate file would make linkers not seeing the weak symbol in the archive unless the frontend doesn't generate one. [1] https://reviews.llvm.org/D34797 Differential Revision: https://reviews.llvm.org/D83967
-
Jon Roelofs authored
-
Lang Hames authored
MSVC doesn't like some of the initializer list uses in 0e940d55. Switch to named arguments to work around this.
-
Dokyung Song authored
[libFuzzer] Disable implicit builtin knowledge about memcmp-like functions when -fsanitize=fuzzer-no-link is given. Summary: This patch disables implicit builtin knowledge about memcmp-like functions when compiling the program for fuzzing, i.e., when -fsanitize=fuzzer(-no-link) is given. This allows libFuzzer to always intercept memcmp-like functions as it effectively disables optimizing calls to such functions into different forms. This is done by adding a set of flags (-fno-builtin-memcmp and others) in the clang driver. Individual -fno-builtin-* flags previously used in several libFuzzer tests are now removed, as it is now done automatically in the clang driver. Reviewers: morehouse, hctim Subscribers: cfe-commits, #sanitizers Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D83987
-
Jonas Devlieghere authored
This test is hitting https://bugs.python.org/issue22393 which results in the lit multiprocessing pool deadlocking and the reproducer job timing out on GreenDragon.
-
Lang Hames authored
-
Lang Hames authored
-
Nico Weber authored
-
Albion Fung authored
This patch adds the instruction definitions and MC tests for the 128-bit Binary Integer Operation instructions introduced in Power10. Differential Revision: https://reviews.llvm.org/D83516
-
Ryan Prichard authored
long double is a 64-bit double-precision type on: - MSVC (32- and 64-bit x86) - Android (32-bit x86) long double is a 128-bit quad-precision type on x86_64 Android. The assembly variants of the 80-bit builtins are correct, but some of the builtins are implemented in C and require that long double be the 80-bit type passed via an x87 register. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D82153
-
Teresa Johnson authored
Fix failure in Android bots from refactoring in 5d2be1a1 (https://crbug.com/1106482). We need to make the UnmapFromTo available outside sanitizer_common for calls from hwasan and asan linux handling. While here, remove declaration of GetHighMemEnd which is no longer in sanitizer_common.
-