summaryrefslogtreecommitdiffstats
path: root/compiler-rt
Commit message (Collapse)AuthorAgeFilesLines
...
* [hwasan] use reads instead of writes in a testKostya Serebryany2018-11-161-1/+3
| | | | llvm-svn: 347107
* Revert "Cast the 2nd argument of _Unwind_SetIP() to _Unwind_Ptr"Kamil Rytarowski2018-11-161-1/+1
| | | | | | | | _Unwind_Ptr is unknown on some targets. Detected on green-dragon-21 (MacPro Late 2013 | OS X 10.14(18A391) | Xcode 10.1(10B61)). llvm-svn: 347106
* Cast the 2nd argument of _Unwind_SetIP() to _Unwind_PtrKamil Rytarowski2018-11-161-1/+1
| | | | | | | | | | | This modification is require for NetBSD with GCC, as there is a custom unwind.h header implementation with different types. No functional change intended for others. Cherry-picked chunk from D33878. llvm-svn: 347102
* Cast _Unwind_GetIP() and _Unwind_GetRegionStart() to uintptr_tKamil Rytarowski2018-11-161-3/+2
| | | | | | | | | | | This modification is require for NetBSD with GCC, as there is a custom unwind.h header implementation with different types. No functional change intended for others. Cherry-picked chunk from D33878. llvm-svn: 347101
* [sanitizer] Update global_symbols.txtVitaly Buka2018-11-161-0/+3
| | | | llvm-svn: 347099
* [hwasan] disable one test line while investigating a bot failureKostya Serebryany2018-11-161-1/+1
| | | | llvm-svn: 347091
* Add new interceptor for mi_vector_hash(3)Kamil Rytarowski2018-11-163-0/+37
| | | | | | | | | | | | | | | | | | | | | | | Summary: mi_vector_hash(3) provides fast 32bit hash functions. Add a test for this interface. Enable the API for NetBSD. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54530 llvm-svn: 347088
* Add new interceptor for getmntinfo(3) from NetBSDKamil Rytarowski2018-11-163-0/+45
| | | | | | | | | | | | | | | | | | | | | Summary: getmntinfo gets information about mounted file systems. Add a dedicated test for new interceptor. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54611 llvm-svn: 347083
* [hwasan] optionally right-align heap allocationsKostya Serebryany2018-11-166-16/+170
| | | | | | | | | | | | | | | | | Summary: ... so that we can find intra-granule buffer overflows. The default is still to always align left. It remains to be seen wether we can enable this mode at scale. Reviewers: eugenis Reviewed By: eugenis Subscribers: jfb, dvyukov, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D53789 llvm-svn: 347082
* [compiler-rt] Use exact spelling when building for default targetPetr Hosek2018-11-161-1/+4
| | | | | | | | | | | When building for default target only, use exact target spelling when deriving the name for the per-target runtime directory. This is necessary for AArch32 where the CMake build by default rewrites the architecture which leads to unexpected results. Differential Revision: https://reviews.llvm.org/D54612 llvm-svn: 347022
* Start adding the supporting code to perform out-of-process allocatorDan Liew2018-11-154-9/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enumeration. Summary: This patch introduces the local portion (`LocalAddressSpaceView`) of the `AddressSpaceView` abstraction and modifies the secondary allocator so that the `ForEachChunk()` method (and its callees) would work in the out-of-process case when `AddressSpaceView` is `RemoteAddressSpaceView`. The `AddressSpaceView` abstraction simply maps pointers from a target process to a pointer in the local process (via its `Load()` method). For the local (in-process) case this is a no-op. For the remote (out-of-process) case this is not a no-op. The implementation of the out-of-process `RemoteAddressSpaceView` is not included in this patch and will be introduced later. This patch is considerably simpler than the `ObjectView` abstraction used in previous patches but lacks the type safety and stricter memory management of the `ObjectView` abstraction. This patch does not introduce any tests because with `LocalAddressSpaceView` it should be a non functional change and unit tests already cover the secondary allocator. When `RemoteAddressSpaceView` is landed tests will be added to ensure that it functions as expected. rdar://problem/45284065 Reviewers: kcc, kubamracek, dvyukov, vitalybuka, cryptoad, george.karpenkov, morehouse Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D53975 llvm-svn: 346956
* [CMake] Passthrough CFLAGS when checking the compiler-rt pathPetr Hosek2018-11-141-0/+3
| | | | | | | | | | This is needed when cross-compiling for a different target since CFLAGS may contain additional flags like -resource-dir which change the location in which compiler-rt builtins are found. Differential Revision: https://reviews.llvm.org/D54371 llvm-svn: 346820
* [lsan] [FIXUP] Fixup for http://reviews.llvm.org/D54484George Karpenkov2018-11-131-1/+1
| | | | | | | | After the change, the tests started failing, as skipped sections can be equal in size to kMaxSegName. Changing `<` to `<=` to address the off-by-one problem. llvm-svn: 346804
* [lsan] [NFC] Change ARRAY_SIZE to internal_strnlenGeorge Karpenkov2018-11-131-1/+3
| | | | | | | | | | | Calling ARRAY_SIZE on a char* will not actually compute it's size, but just the pointer size. A new Clang warning enabled by default warns about this. Replaced the call with internal_strnlen. Differential Revision: https://reviews.llvm.org/D54484 llvm-svn: 346792
* Correct atexit(3) support in MSan/NetBSDKamil Rytarowski2018-11-101-3/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The NetBSD specific implementation of cxa_atexit() does not preserve the 2nd argument if dso is equal to NULL. Changes: - Split paths of handling intercepted __cxa_atexit() and atexit(3). This affects all supported Operating Systems. - Add a local stack-like structure to hold the __cxa_atexit() context. atexit(3) is documented in the C standard as calling callback from the earliest to the oldest entry. This path also fixes potential ABI problem of passing an argument to a function from the atexit(3) callback mechanism. - Allow usage of global vars with ctors in interceptors. This allows to use Vector without automatic cleaning up the structures. This code has been modeled after TSan implementation for the same functions. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dvyukov, eugenis, vitalybuka, kcc Reviewed By: vitalybuka Subscribers: delcypher, devnexen, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40714 llvm-svn: 346579
* Re-land r343606 "[winasan] Unpoison the stack in NtTerminateThread"Reid Kleckner2018-11-092-1/+12
| | | | | | | | | This change was reverted because it caused some nacl tests in chromium to fail. I attempted to reproduce those problems locally, but I was unable to. Let's reland this and let Chromium's test infrastructure discover any problems. llvm-svn: 346560
* [hwasan] Add entire report to abort message on Android.Evgeniy Stepanov2018-11-096-9/+82
| | | | | | | | | | | | | | Summary: When reporting a fatal error, collect and add the entire report text to android_set_abort_message so that it can be found in the tombstone. Reviewers: kcc, vitalybuka Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D54284 llvm-svn: 346557
* [XRay] Add a test for function id encoding/decoding (NFC)Dean Michael Berris2018-11-091-0/+26
| | | | | | Increase test coverage for function enter/exit encoding/decoding. llvm-svn: 346477
* [XRay] Add a static assertion on size of metadata payload (NFC)Dean Michael Berris2018-11-091-0/+19
| | | | | | | This change adds a static check to ensure that all data metadata record payloads don't go past the available buffers in Metadata records. llvm-svn: 346476
* [XRay] Fix enter function tracing for record unwritingDean Michael Berris2018-11-092-3/+51
| | | | | | | | | | | | | | | | Summary: Before this change, we could run into a situation where we may try to undo tail exit records after writing metadata records before a function enter event. This change rectifies that by resetting the tail exit counter after writing the metadata records. Reviewers: mboerger Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54292 llvm-svn: 346475
* [XRay] Add atomic fences around non-atomic reads and writesDean Michael Berris2018-11-092-0/+29
| | | | | | | | | | | | | | | | | | Summary: We need these fences to ensure that other threads attempting to read bytes in the buffer will see thw writes committed before the extents are updated. Without these, the writes can be un-committed by the time the buffer extents counter is updated -- the fences should ensure that the records written into the log have completed by the time we observe the buffer extents from different threads. Reviewers: mboerger Subscribers: jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D54291 llvm-svn: 346474
* [XRay] Improve FDR trace handling and error messagingDean Michael Berris2018-11-093-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change covers a number of things spanning LLVM and compiler-rt, which are related in a non-trivial way. In LLVM, we have a library that handles the FDR mode even log loading, which uses C++'s runtime polymorphism feature to better faithfully represent the events that are written down by the FDR mode runtime. We do this by interpreting a trace that's serliased in a common format agreed upon by both the trace loading library and the FDR mode runtime. This library is under active development, which consists of features allowing us to reconstitute a higher-level event log. This event log is used by the conversion and visualisation tools we have for interpreting XRay traces. One of the tools we have is a diagnostic tool in llvm-xray called `fdr-dump` which we've been using to debug our expectations of what the FDR runtime should be writing and what the logical FDR event log structures are. We use this fairly extensively to reason about why some non-trivial traces we're generating with FDR mode runtimes fail to convert or fail to parse correctly. One of these failures we've found in manual debugging of some of the traces we've seen involve an inconsistency between the buffer extents (a record indicating how many bytes to follow are part of a logical thread's event log) and the record of the bytes written into the log -- sometimes it turns out the data could be garbage, due to buffers being recycled, but sometimes we're seeing the buffer extent indicating a log is "shorter" than the actual records associated with the buffer. This case happens particularly with function entry records with a call argument. This change for now updates the FDR mode runtime to write the bytes for the function call and arg record before updating the buffer extents atomically, allowing multiple threads to see a consistent view of the data in the buffer using the atomic counter associated with a buffer. What we're trying to prevent here is partial updates where we see the intermediary updates to the buffer extents (function record size then call argument record size) becoming observable from another thread, for instance, one doing the serialization/flushing. To do both diagnose this issue properly, we need to be able to honour the extents being set in the `BufferExtents` records marking the beginning of the logical buffers when reading an FDR trace. Since LLVM doesn't use C++'s RTTI mechanism, we instead follow the advice in the documentation for LLVM Style RTTI (https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html). We then rely on this RTTI feature to ensure that our file-based record producer (our streaming "deserializer") can honour the extents of individual buffers as we interpret traces. This also sets us up to be able to eventually do smart skipping/continuation of FDR logs, seeking instead to find BufferExtents records in cases where we find potentially recoverable errors. In the meantime, we make this change to operate in a strict mode when reading logical buffers with extent records. Reviewers: mboerger Subscribers: hiraditya, llvm-commits, jfb Differential Revision: https://reviews.llvm.org/D54201 llvm-svn: 346473
* [hwasan] Remove dead code.Evgeniy Stepanov2018-11-095-74/+0
| | | | llvm-svn: 346452
* Introduce `sanitizer_malloc_introspect_t` for Darwin which is a sub-class of ↵Dan Liew2018-11-081-1/+23
| | | | | | | | | | | | | | | | | | | | | | Darwin's `malloc_introspection_t` and use it when setting up the malloc zone. Summary: Currently `sanitizer_malloc_introspection_t` just adds a version field which is used to version the allocator ABI. The current allocator ABI version is returned by the new `GetMallocZoneAllocatorEnumerationVersion()` function. The motivation behind this change is to allow external processes to determine the allocator ABI of a sanitized process. rdar://problem/45284065 Reviewers: kubamracek, george.karpenkov, vitalybuka Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D54045 llvm-svn: 346420
* [Profile] The test for gcov-fork seems to be ok on armCalixte Denizet2018-11-081-2/+0
| | | | | | | | | | | | | | Summary: Remove the XFAIL for arm since it seems to be ok Reviewers: marco-c Reviewed By: marco-c Subscribers: javed.absar, kristof.beyls, delcypher, chrib, llvm-commits, #sanitizers, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D54263 llvm-svn: 346409
* Split lgammal() from INIT_LGAMMALKamil Rytarowski2018-11-072-4/+12
| | | | | | | | | | | | | | | | | | | | | | Summary: Introduce SANITIZER_INTERCEPT_LGAMMAL dedicated for lgammal(). Disable it for NetBSD as this routine is not implemented in this OS. Installation of supernumerary interceptors causes leaking of errors to dlsym(3)-like operations. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54054 llvm-svn: 346352
* Split remquol() from INIT_REMQUOKamil Rytarowski2018-11-072-4/+12
| | | | | | | | | | | | | | | | | | | | | | Summary: Introduce SANITIZER_INTERCEPT_REMQUOL dedicated for remquol(). Disable for for NetBSD as this routine is not implemented in this OS. Installation of supernumerary interceptors causes leaking of errors to dlsym(3)-like operations. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54051 llvm-svn: 346351
* [CMake][ASan][HWASan] Set an explicit dependency on libc++ headersPetr Hosek2018-11-072-12/+32
| | | | | | | | | | | | | | We have seen failing builds due to a race condition between RTAsan_dynamic and libc++ headers builds, specifically libc++ headers depend on __config and if this header hasn't been copied into the final location, including other headers will typically result in failure. To avoid this race, we add an explicit dependency on libc++ headers which ensures that they've been copied into place before the sanitizer object library build starts. Differential Revision: https://reviews.llvm.org/D54198 llvm-svn: 346339
* [Profile] Mark gcov-fork test as failing for armCalixte Denizet2018-11-071-0/+2
| | | | | | | | | | | | | | Summary: instrprof-gcov-fork.test is failing with arm so mark it as XFAIL Reviewers: marco-c Reviewed By: marco-c Subscribers: javed.absar, kristof.beyls, delcypher, chrib, llvm-commits, sylvestre.ledru, #sanitizers Differential Revision: https://reviews.llvm.org/D54209 llvm-svn: 346329
* [Profile] Fix fork test and add tests for execlp and execvp after patch ↵Calixte Denizet2018-11-078-4/+102
| | | | | | | | | | | | | | | | https://reviews.llvm.org/D53593 Summary: This is a follow-up of patch https://reviews.llvm.org/D53593 Reviewers: marco-c Reviewed By: marco-c Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D54167 llvm-svn: 346314
* [GCOV] Close file mapping handle on Windows, so flushed gcda files can be ↵Marco Castelluccio2018-11-076-8/+104
| | | | | | removed while the process is in execution llvm-svn: 346300
* [XRay] Use TSC delta encoding for custom/typed eventsDean Michael Berris2018-11-073-69/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change updates the version number for FDR logs to 5, and update the trace processing to support changes in the custom event records. In the runtime, since we're already writing down the record preamble to handle CPU migrations and TSC wraparound, we can use the same TSC delta encoding in the custom event and typed event records that we use in function event records. We do the same change to typed events (which were unsupported before this change in the trace processing) which now show up in the trace. Future changes should increase our testing coverage to make custom and typed events as first class entities in the FDR mode log processing tools. This change is also a good example of how we end up supporting new record types in the FDR mode implementation. This shows the places where new record types are added and supported. Depends on D54139. Reviewers: mboerger Subscribers: hiraditya, arphaman, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D54140 llvm-svn: 346293
* [sanitizer] Only set soft coredump limit.Evgeniy Stepanov2018-11-072-4/+6
| | | | | | | | | | | | Summary: If user wants to raise it back, let them. Reviewers: kcc, vitalybuka Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D54190 llvm-svn: 346284
* [fuzzer] Read files as binaryJonathan Metzman2018-11-064-3/+28
| | | | | | | | | | | | Summary: Read corpus files as binary to avoid automatic conversions Reviewers: Dor1s, morehouse Reviewed By: Dor1s, morehouse Differential Revision: https://reviews.llvm.org/D54180 llvm-svn: 346279
* [Darwin] Export new weak external symbols when compiling with coverageVedant Kumar2018-11-061-0/+8
| | | | | | | | | | | Some weak external symbols were added to the profile runtime in D49953, and on Darwin, these need to be exported for tapi verification purposes. I've tightened the test so that future breakages can be caught earlier. rdar://45831054 llvm-svn: 346276
* [sanitizer] Return headed to fix build after r346258Vitaly Buka2018-11-061-0/+1
| | | | llvm-svn: 346270
* [dfsan] Fix build after r346262Benjamin Kramer2018-11-061-1/+1
| | | | | | | | | | | | | | compiler-rt/lib/dfsan/dfsan.cc:426:3: error: call to 'InitializePlatformEarly' is ambiguous InitializePlatformEarly(); ^~~~~~~~~~~~~~~~~~~~~~~ compiler-rt/lib/dfsan/../sanitizer_common/sanitizer_common.h:901:6: note: candidate function void InitializePlatformEarly(); ^ compiler-rt/lib/dfsan/dfsan.cc:391:13: note: candidate function static void InitializePlatformEarly() { ^ llvm-svn: 346264
* [sanitizer] Use "fast mmap" kernel flag for shadow memory on macOS 10.13.4+Kuba Mracek2018-11-068-2/+38
| | | | | | | | This speeds up process startup and teardown and also reduces lock contention when running multiple ASanified/TSanified processes simultaneously. Should greatly improve lit testing time. Differential Revision: https://reviews.llvm.org/D48445 llvm-svn: 346262
* [sanitizer] Fix nolibc unittests broken by r346215Vitaly Buka2018-11-062-30/+36
| | | | | | | | Subscribers: kubamracek, krytarowski, fedor.sergeev, llvm-commits Differential Revision: https://reviews.llvm.org/D54163 llvm-svn: 346258
* [sanitizer] Add char **GetEnviron() on all other platformsVitaly Buka2018-11-066-3/+21
| | | | | | | | Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D54165 llvm-svn: 346257
* Adapt UBSan integer truncation tests to NetBSDKamil Rytarowski2018-11-0610-198/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The NetBSD headers use internal indirect type for standard *int*_t definitions. The internal type is unrolled inside the sanitizer into e.g. __int32_t from int32_t. This symbol mangling causes pattern mismatch in the interger truncation tests as they expect exact types such as 'int32_t'. Change the pattern rules so every acceptable internal form of *int*_t will be accepted flawlessly. Reviewers: lebedev.ri, vitalybuka, joerg Reviewed By: lebedev.ri Subscribers: kubamracek, dmgreen, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54150 llvm-svn: 346228
* Prioritize the constructor call of __local_xray_dyninit()Kamil Rytarowski2018-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: For platforms without preinit support (such as NetBSD/amd64) the initialization routine __xray_init() was called in non-deterministic order compared to other constructors. This caused breakage failures as xray routines attempted to execute code with assumption of being initialized, which was no always true. Use GCC/Clang extension to set maximal priority to the constructor calling __xray_init(). This code switches away from C++ lambda form, as it did not allow to specify this compiler extension. Reviewers: dberris, joerg Reviewed By: dberris Subscribers: llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54136 llvm-svn: 346222
* [sanitizer] Use AT_EXECFN in ReExec() if availableBenjamin Kramer2018-11-062-0/+27
| | | | | | | | | | execve("/proc/self/exe") will not work if the binary relies on $EXEC_ORIGIN in an rpath. Query AT_EXECFN instead, which will give the same string that the current binary was exec'd with. Differential Revision: https://reviews.llvm.org/D54113 llvm-svn: 346215
* [XRay] Update XRayRecord to support Custom/Typed EventsDean Michael Berris2018-11-067-34/+41
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change cuts across LLVM and compiler-rt to add support for rendering custom events in the XRayRecord type, to allow for including user-provided annotations in the output YAML (as raw bytes). This work enables us to add custom event and typed event records into the `llvm::xray::Trace` type for user-provided events. This can then be programmatically handled through the C++ API and can be included in some of the tooling as well. For now we support printing the raw data we encounter in the custom events in the converted output. Future work will allow us to start interpreting these custom and typed events through a yet-to-be-defined API for extending the trace analysis library. Reviewers: mboerger Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D54139 llvm-svn: 346214
* Disable XRay test fork_basic_logging for NetBSDKamil Rytarowski2018-11-061-0/+3
| | | | | | This code has not been ported so far. llvm-svn: 346196
* Follow Windows' approach for NetBSD in AlarmCallback()Kamil Rytarowski2018-11-061-1/+2
| | | | | | | NetBSD's current behavior needs to ignore check for InFuzzingThread() in Fuzzer::AlarmCallback(). llvm-svn: 346194
* [libFuzzer] Disable value-profile-cmp.test and fuzzer-oom.test on ARM64George Karpenkov2018-11-063-4/+3
| | | | | | | | | | value-profile-cmp was always flaky, and OOM fails to work in some environments. counters.test fails when vectorization is enabled, and it is more likely to kick in when compiling for ARM. Differential Revision: https://reviews.llvm.org/D54004 llvm-svn: 346193
* [Sanitizers] Disable SANITIZER_CAN_FAST_UNWIND on all SPARC targetsRainer Orth2018-11-052-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing my to-be-submitted Solaris sanitizer support on gcc mainline, I ran into an issue on Solaris/SPARC (sparc-sun-solaris2.11). Initially libasan.so failed to link: Undefined first referenced symbol in file __sanitizer::BufferedStackTrace::FastUnwindStack(unsigned long, unsigned long, unsigned long, unsigned long, unsigned int) /var/gcc/gcc-9.0.0-20181024/11.5-gcc-gas/sparc-sun-solaris2.11/./libsanitizer/asan/.libs/libasan.so This happens because SANITIZER_CAN_FAST_UNWIND is enabled on non-Linux SPARC targets (cf. sanitizer_stacktrace.h), but the guard around the SPARCv8-only definition in sanitizer_stacktrace_sparc.cc only works with clang: clang predefines __sparcv8__ on non-Solaris, and __sparcv8 only on Solaris gcc predefines __sparcv8 on Solaris, but __sparc_v8__ on non-Solaris The attached patch allows for all three variants. However, disabling SANITIZER_CAN_FAST_UNWIND on all SPARC targets fixes a couple of testsuite failures in the Solaris asan testsuite, so for now it's better to keep it disabled everywhere. This allowed the libsanitizer build to complete and gave reasonable (though slightly worse than on Solaris/x86) testsuite results. Differential Revision: https://reviews.llvm.org/D54099 llvm-svn: 346155
* [Sanitizers] Solaris largefile fixesRainer Orth2018-11-054-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing the Solaris libsanitizer port on GCC mainline, I found that I'd messed up the largefile checks in various ways, some of which showed as compile failures (wrong structure sizes and member offsets), others at runtime, some of those only on sparc as a big-endian target. This patch fixes all of them: - OFF_T is now correctly defined for 32-bit largefile and traditional environments, and 64-bit. - The definition of __sanitizer_dirent now checks the correct conditionals. - sanitizer_procmaps_solaris.cc undefines _FILE_OFFSET_BITS: before Solaris 11.4 <procfs.h> doesn't even compile with largefile support enabled, but the use at hand doesn't need it anyway while g++ 9 will define _FILE_OFFSET_BITS=64 out of the box. - With full largefile support enabled, one needs to use e.g. mmap64 instead of mmap; this is hidden behind macros. With this patch I could bootstrap gcc mainline on both sparc-sun-solaris2.11 and i386-pc-solaris2.11. In addition, I've successfully built llvm on i386-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D54101 llvm-svn: 346153
* [UBsan] disable few tests for FreeBSDDavid Carlier2018-11-052-0/+4
| | | | | | | | | | Reviewers: krytarowsky, vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D54103 llvm-svn: 346145
OpenPOWER on IntegriCloud