summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@andric.com>2016-03-10 20:22:02 +0000
committerDimitry Andric <dimitry@andric.com>2016-03-10 20:22:02 +0000
commitb45bf0af9101778ca6f6e8384b799361f36a9210 (patch)
tree3bc844e51726e46b0a941ce709fbaa6a460d28bc /lldb/source/Plugins/ScriptInterpreter/Python
parentaba16fca5de0aeb61d35c4e9261fa8feec639d94 (diff)
downloadbcm5719-llvm-b45bf0af9101778ca6f6e8384b799361f36a9210.tar.gz
bcm5719-llvm-b45bf0af9101778ca6f6e8384b799361f36a9210.zip
Retrieve command line arguments and environment correctly on FreeBSD
Summary: Recently I saw the test `TestCases/Posix/print_cmdline.cc` failing on FreeBSD, with "expected string not found in input". This is because asan could not retrieve the command line arguments properly. In `lib/sanitizer_common/sanitizer_linux.cc`, this is taken care of by the `GetArgsAndEnv()` function, but it uses `__libc_stack_end` to get at the required data. This variable does not exist on BSDs; the regular way to retrieve the arguments and environment information is via the `kern.ps_strings` sysctl. I added this functionality in sanitizer_linux.cc, as a separate #ifdef block in `GetArgsAndEnv()`. Also, `ReadNullSepFileToArray()` becomes unused due to this change. (It won't work on FreeBSD anyway, since `/proc` is not mounted by default.) Reviewers: kcc, emaste, joerg, davide Subscribers: llvm-commits, emaste Differential Revision: http://reviews.llvm.org/D17832 llvm-svn: 263157
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud