summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/ubsan/ubsan_init_standalone_preinit.cc
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc files in lib/ubsan to .cpp.Nico Weber2019-07-311-35/+0
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367452
* 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
* [ubsan] Add preinit initializer for ubsanFrancis Ricci2018-01-231-0/+36
| | | | | | | | | | | | | | | | | | | | Summary: Now that ubsan does function interception (for signals), we need to ensure that ubsan is initialized before any library constructors are called. Otherwise, if a constructor calls sigaction, ubsan will intercept in an unitialized state, which will cause a crash. This patch is a partial revert of r317757, which removed preinit arrays for ubsan. Reviewers: vitalybuka, eugenis, pcc Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42389 llvm-svn: 323249
* ubsan: Allow programs to use setenv to configure ubsan_standalone.Peter Collingbourne2017-11-091-37/+0
| | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 317757
* [ubsan] Support signal specific options in ubsanVitaly Buka2017-09-231-1/+12
| | | | | | | | | | | | | | | | 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 llvm-svn: 314052
* [ubsan] Split ubsan_init_standaloneVitaly Buka2017-09-211-0/+26
| | | | | | | | | | | | | | 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 llvm-svn: 313851
* Revert "[ubsan] Split ubsan_init_standalone"Vitaly Buka2017-09-181-26/+0
| | | | | | | | Breaks build. This reverts commit r313583 and r313584. llvm-svn: 313585
* [ubsan] Add file missing from r313583Vitaly Buka2017-09-181-0/+26
llvm-svn: 313584
OpenPOWER on IntegriCloud