summaryrefslogtreecommitdiff
path: root/lib/ubsan
AgeCommit message (Collapse)Author
2017-12-21[ubsan] Diagnose noreturn functions which return (compiler-rt)Vedant Kumar
This is paired with the clang change: https://reviews.llvm.org/D40698 Differential Revision: https://reviews.llvm.org/D40700 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321232 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18Revert r320977 "No -fsanitize=function warning when calling noexcept ↵Stephan Bergmann
function through non-noexcept pointer in C++17" At least <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/ builds/6013/steps/annotate/logs/stdio> complains about __ubsan::__ubsan_handle_function_type_mismatch_abort (compiler-rt lib/ubsan/ubsan_handlers.cc) returning now despite being declared 'noreturn', so looks like a different approach is needed for the function_type_mismatch check to be called also in cases that may ultimately succeed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320981 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18No -fsanitize=function warning when calling noexcept function through ↵Stephan Bergmann
non-noexcept pointer in C++17 As discussed in the mail thread <https://groups.google.com/a/isocpp.org/forum/ #!topic/std-discussion/T64_dW3WKUk> "Calling noexcept function throug non- noexcept pointer is undefined behavior?", such a call should not be UB. However, Clang currently warns about it. There is no cheap check whether two function type_infos only differ in noexcept,so pass those two type_infos as additional data to the function_type_mismatch handler (with the optimization of passing a null "static callee type" info when that is already noexcept, so the additional check can be avoided anyway). For the Itanium ABI (which appears to be the only one that happens to be used on platforms that support -fsanitize=function, and which appears to only record noexcept information for pointer-to-function type_infos, not for function type_infos themselves), we then need to check the mangled names for occurrence of "Do" representing "noexcept". This is the compiler-rt part of a patch covering both cfe and compiler-rt. Differential Revision: https://reviews.llvm.org/D40720 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320977 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-14[Sanitizers] Basic sanitizer Solaris support (PR 33274)Kamil Rytarowski
Summary: This is the first mostly working version of the Sanitizer port to 32-bit Solaris/x86. It is currently based on Solaris 11.4 Beta. This part was initially developed inside libsanitizer in the GCC tree and should apply to both. Subsequent parts will address changes to clang, the compiler-rt build system and testsuite. I'm not yet sure what the right patch granularity is: if it's profitable to split the patch up, I'd like to get guidance on how to do so. Most of the changes are probably straightforward with a few exceptions: * The Solaris syscall interface isn't stable, undocumented and can change within an OS release. The stable interface is the libc interface, which I'm using here, if possible using the internal _-prefixed names. * While the patch primarily target 32-bit x86, I've left a few sparc changes in. They cannot currently be used with clang due to a backend limitation, but have worked fine inside the gcc tree. * Some functions (e.g. largefile versions of functions like open64) only exist in 32-bit Solaris, so I've introduced a separate SANITIZER_SOLARIS32 to check for that. The patch (with the subsequent ones to be submitted shortly) was tested on i386-pc-solaris2.11. Only a few failures remain, some of them analyzed, some still TBD: AddressSanitizer-i386-sunos :: TestCases/Posix/concurrent_overflow.cc AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos :: TestCases/log-path_test.cc AddressSanitizer-i386-sunos :: TestCases/malloc-no-intercept.c AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/concurrent_overflow.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/start-deactivated.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/default_options.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/log-path_test.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/malloc-no-intercept.c SanitizerCommon-Unit :: ./Sanitizer-i386-Test/MemoryMappingLayout.DumpListOfModules SanitizerCommon-Unit :: ./Sanitizer-i386-Test/SanitizerCommon.PthreadDestructorIterations Maybe this is good enough the get the ball rolling. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, jyknight, kubamracek, krytarowski, fedor.sergeev, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40898 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320740 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[sanitizers] Rename GetStackTraceWithPcBpAndContextVitaly Buka
Name does not need to enumerate arguments. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317774 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09ubsan: Allow programs to use setenv to configure ubsan_standalone.Peter Collingbourne
Previously ubsan_standalone used the GetEnv function to read the environment variables UBSAN_OPTIONS and UBSAN_SYMBOLIZER_PATH. The problem with GetEnv is that it does not respect changes to the environment variables made using the libc setenv function, which prevents clients from setting environment variables to configure ubsan before loading ubsan-instrumented libraries. The reason why we have GetEnv is that some runtimes need to read environment variables while they initialize using .preinit_array, and getenv does not work while .preinit_array functions are being called. However, it is unnecessary for ubsan_standalone to initialize that early. So this change switches ubsan_standalone to using getenv and removes the .preinit_array entry. The static version of the runtime still ends up being initialized using a C++ constructor that exists to support the shared runtime. Differential Revision: https://reviews.llvm.org/D39827 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317757 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-09[sanitizer] Don't intercept signal and sigaction on FuchsiaPetr Hosek
Fuchsia doesn't support signals, so don't use interceptors for signal or sigaction. Differential Revision: https://reviews.llvm.org/D38669 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-07[ubsan] Add a static runtime on DarwinVedant Kumar
As a follow-up to r315142, this makes it possible to use ubsan with a static runtime on Darwin. I've also added a new StandaloneStatic testing configuration so the new setup can be tested. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315143 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-04[sanitizer] Move cxx-abi library earlier in link flags.Evgeniy Stepanov
Summary: This change moves cxx-abi library in asan/ubsan/dd link command line ahead of other libraries, such as pthread/rt/dl/c/gcc. Given that cxx-abi may be the full libstdc++/libc++, it makes sense for it to be ahead of libc and libgcc, at least. The real motivation is Android, where in the arm32 NDK toolchain libstdc++.a is actually a linker script that tries to sneak LLVM's libunwind ahead of libgcc's. Wrong library order breaks unwinding. Reviewers: srhines, danalbert Subscribers: aemerson, kubamracek, mgorny, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D38520 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314948 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-28[ubsan] Merge ubsan_standalone_cxx shared library.Evgeniy Stepanov
Summary: Link everything, including the C++ bits, in the single ubsan_standalone SHARED library. This matches ASan setup. Reviewers: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D38340 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314369 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-23[ubsan] Replace CommonSanitizerReportMutex with ScopedErrorReportLockVitaly Buka
Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D38194 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314053 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-23[ubsan] Support signal specific options in ubsanVitaly Buka
Summary: Part of https://github.com/google/sanitizers/issues/637 Standalone ubsan needs signal and sigaction handlers and interceptors. Plugin mode should rely on parent tool. Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D37895 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314052 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-21[ubsan] Split ubsan_init_standaloneVitaly Buka
Summary: On Linux we may need preinit_array in static lib and ubsan_standalone_initializer in shared lib. Reviewers: eugenis Subscribers: kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D38013 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313851 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18Revert "[ubsan] Split ubsan_init_standalone"Vitaly Buka
Breaks build. This reverts commit r313583 and r313584. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313585 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18[ubsan] Add file missing from r313583Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313584 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18[ubsan] Split ubsan_init_standaloneVitaly Buka
On Linux we may need preinit_array in static lib and ubsan_standalone_initializer in shared lib. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313583 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18[ubsan] Fix conflict with previous declaration on MacVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18[ubsan] Fix interface_symbols_windows testVitaly Buka
Summary: 1. Update ubsan_interface.inc to make the test happy. 2. Switch interface_symbols_linux and interface_symbols_darwin to C++ to import __ubsan_handle_dynamic_type_cache_miss 3. Switch interface_symbols_windows to C++ for consistency. Reviewers: rnk, zturner Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37986 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313551 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18Revert "[ubsan] Add RTUbsan_standalone into UBSAN standalone shared"Vitaly Buka
Error: .preinit_array section is not allowed in DSO This reverts commit r313519. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313520 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18[ubsan] Add RTUbsan_standalone into UBSAN standalone sharedVitaly Buka
Same as for Apple. This also fixes flags related tests on Android as without this flags are not initialized. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313519 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16Revert "[ubsan] Update ubsan_interface.inc"Vitaly Buka
This brakes interface_symbols_linux.c test. This reverts commit r313432. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313439 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16[ubsan] Update ubsan_interface.incVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313432 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15Try to fix check-asan.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313423 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15ubsan: Unbreak ubsan_cxx runtime library on Windows.Peter Collingbourne
This was originally broken by r258744 which introduced a weak reference from ubsan to ubsan_cxx. This reference does not work directly on Windows because COFF has no direct concept of weak symbols. The fix is to use /alternatename to create a weak external reference to ubsan_cxx. Also fix the definition (and the name, so that we drop cached values) of the cmake flag that controls whether to build ubsan_cxx. Now the user-controllable flag is always on, and we turn it off internally depending on whether we support building it. Differential Revision: https://reviews.llvm.org/D37882 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313391 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15ubsan: Stop building the DLL version of the runtime library on Windows.Peter Collingbourne
As far as I know we never use it. Differential Revision: https://reviews.llvm.org/D37884 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313378 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15[ubsan] Extract GetStackTraceWithPcBpAndContext similar to asan versionVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313350 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11[ubsan] Make ubsan version of __sanitizer_print_stack_trace consistent with ↵Vitaly Buka
other sanitizers Summary: Other sanitizers include __sanitizer_print_stack_trace into stack trace. Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37657 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312954 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11[ubsan] Save binary name before parsing optionsVitaly Buka
Summary: To parser "include" we may need to do binary name substitution. Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37658 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312953 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11Revert "[ubsan] Save binary name before parsing options"Vitaly Buka
Patch was corrupted by rebase. This reverts commit r312933 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312952 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11[compiler-rt] Cleanup decoratorsVitaly Buka
Summary: Removed redundant End*() methods which defined same way. Removed redundant Warning() methods. Reviewers: eugenis Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D37549 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312950 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11[ubsan] Save binary name before parsing optionsVitaly Buka
Summary: To parser "include" we may need to do binary name substitution. Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37658 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312933 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-28Reland r311842 - [cmake] Remove i686 target that is duplicate to i386Michal Gorny
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311924 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-27Revert r311842 - [cmake] Remove i686 target that is duplicate to i386Michal Gorny
The required change in clang is being reverted because of the Android build bot failure. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311859 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-27[cmake] Remove i686 target that is duplicate to i386Michal Gorny
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311842 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-08Enable ubsan on NetBSDKamil Rytarowski
Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, filcab, fjricci Reviewed By: fjricci Subscribers: srhines, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36483 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310412 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01[ubsan] Enable UBSan build for FuchsiaVitaly Buka
Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: srhines, kubamracek, mgorny, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36033 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309742 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29[ubsan] Diagnose invalid uses of builtins (compiler-rt)Vedant Kumar
Differential Revision: https://reviews.llvm.org/D34591 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309461 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28Support libc++abi in addition to libstdc++Petr Hosek
This change adds sanitizer support for LLVM's libunwind and libc++abi as an alternative to libstdc++. This allows using the in tree version of libunwind and libc++abi which is useful when building a toolchain for different target. Differential Revision: https://reviews.llvm.org/D34501 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309362 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28Support compiler-rt builtinsPetr Hosek
This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309361 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26Add liblog to ubsan `UBSAN_DYNAMIC_LIBS`Leo Li
Summary: liblog is still required to create ubsan runtimes on Android when __ANDROID_API__ < 21. Reviewers: eugenis, vsk Subscribers: kubamracek, mgorny, pirama, srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D35915 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309180 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26Revert "[sanitizer] Support compiler-rt builtins"Petr Hosek
This reverts commit fd63314d6770e0da62572a3fea2c41c4cc0fc58a. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26Revert "[sanitizer] Support libc++abi in addition to libstdc++"Petr Hosek
This reverts commit d1997bff31cf6b484eb59c2ee1fc3155442e338c. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309082 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26[sanitizer] Support libc++abi in addition to libstdc++Petr Hosek
This change adds sanitizer support for LLVM's libunwind and libc++abi as an alternative to libstdc++. This allows using the in tree version of libunwind and libc++abi which is useful when building a toolchain for different target. Differential Revision: https://reviews.llvm.org/D34501 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309074 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25[sanitizer] Support compiler-rt builtinsPetr Hosek
This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13[ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" ↵Vedant Kumar
(compiler-rt) Compiler-rt changes associated with: D34121 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307956 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-23[ubsan] Improve diagnostics for return value checks (compiler-rt)Vedant Kumar
Differential Revision: https://reviews.llvm.org/D34298 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306164 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15[ubsan] Fix a faulty memory accessibility checkVedant Kumar
The dynamic type check needs to inspect vtables, but could crash if it encounters a vtable pointer to inaccessible memory. In the first attempt to fix the issue (r304437), we performed a memory accessibility check on the wrong range of memory. This should *really* fix the problem. Patch by Max Moroz! Differential Revision: https://reviews.llvm.org/D34215 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@305489 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-12[ubsan] Detect invalid unsigned pointer index expression (compiler-rt)Vedant Kumar
Compiler-rt part of: https://reviews.llvm.org/D33910 Differential Revision: https://reviews.llvm.org/D33911 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@305217 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-01[ubsan] Runtime support for pointer overflow checkingVedant Kumar
Patch by John Regehr and Will Dietz! Differential Revision: https://reviews.llvm.org/D20323 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304461 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-01Bug 33221 [UBSAN] segfault with -fsanitize=undefinedVedant Kumar
There is can be a situation when vptr is not initializing by constructor of the object, and has a junk data which should be properly checked, because c++ standard says: "if default constructor is not specified 16 (7.3) no initialization is performed." Patch by Denis Khalikov! Differential Revision: https://reviews.llvm.org/D33712 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304437 91177308-0d34-0410-b5e6-96231b3b80d8