summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-11-09 02:22:07 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-11-09 02:22:07 +0000
commitc6721f580df11bb0bd00217a45430d163770a278 (patch)
treedb4d0feddd152b302ad4079c6049f5820728ab10 /llvm/tools/llvm-cov/SourceCoverageViewText.cpp
parente1d121d71579b2c855d80057833ceb74849b3053 (diff)
downloadbcm5719-llvm-c6721f580df11bb0bd00217a45430d163770a278.tar.gz
bcm5719-llvm-c6721f580df11bb0bd00217a45430d163770a278.zip
ubsan: Allow programs to use setenv to configure ubsan_standalone.
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
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageViewText.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud