<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 12, 2013 at 9:27 PM, Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel@zuster.org" target="_blank">daniel@zuster.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">IMHO, it is mildly incorrect to view this as a problem to solve via the lit.cfg.<div><br></div><div>Doesn't this indicate that there is also a problem from the user perspective of ASAN? How is this supposed to work for the user? Do they have to set things in their environment to get symbolized traces?</div>
</div></blockquote><div><br></div><div style>Yep, currently one option is to set env variable, another is to filter the output through python script. Of course, such user</div><div style>experience is far from great and we are trying to do better. The latter way (python script) is fine if you run the program locally, but is worse for automated testing or build bots.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div><br></div><div>If you solve that problem then usually the test suite doesn't have to be changed. Of course, we have tons of things like this for expediency and I have no problem with that.</div><span class="HOEnZb"><font color="#888888"><div>

<br></div><div> - Daniel</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 12, 2013 at 1:10 AM, Evgeniy Stepanov <span dir="ltr"><<a href="mailto:eugenis@google.com" target="_blank">eugenis@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi ddunbar, samsonov,<br>
<br>
This is needed to get symbolized stack traces when running LLVM tests under (A|M)San.<br>
<br>
I don't like code duplication, but this seems commonplace in lit.cfg's. I also have an identical patch to Clang (test/ and test/Unit/), if this is deemed acceptable.<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D529" target="_blank">http://llvm-reviews.chandlerc.com/D529</a><br>
<br>
Files:<br>
  test/Unit/lit.cfg<br>
  test/lit.cfg<br>
<br>
Index: test/Unit/lit.cfg<br>
===================================================================<br>
--- test/Unit/lit.cfg<br>
+++ test/Unit/lit.cfg<br>
@@ -81,3 +81,8 @@<br>
         shlibpath = os.pathsep + shlibpath<br>
     shlibpath = config.shlibdir + shlibpath<br>
     config.environment[config.shlibpath_var] = shlibpath<br>
+<br>
+# Setup paths to llvm-symbolizer for Sanitizer tools.<br>
+llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)<br>
+config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'<br>
+config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'<br>
Index: test/lit.cfg<br>
===================================================================<br>
--- test/lit.cfg<br>
+++ test/lit.cfg<br>
@@ -90,6 +90,11 @@<br>
 config.environment['PYTHON_EXECUTABLE'] = getattr(config, 'python_executable',<br>
                                                   '')<br>
<br>
+# Setup paths to llvm-symbolizer for Sanitizer tools.<br>
+llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)<br>
+config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'<br>
+config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'<br>
+<br>
 ###<br>
<br>
 import os<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div></div>