<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/120915>120915</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm-symbolizer can fail due to asan-compiled dependency libraries in LD_LIBRARY_PATH; SIGPIPE exit results
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
greghudson
</td>
</tr>
</table>
<pre>
This issue only affects developers of libraries in the dependency chain of llvm-symbolizer, and it might be tough to fix.
I maintain MIT krb5. Our `make check` runs various binaries with LD_LIBRARY_PATH set to a subdirectory of the build directory containing the built versions of libgssapi_krb5/libkrb5/etc.. If we have built everything with -fsanitizer=address and asan wants to report a problem with a stack trace when one of the binaries exits, llvm-symbolizer gets run to convert addresses into symbol names. When llvm-symbolizer starts, the dynamic linker sees a bunch of asan-compiled krb5 libraries in LD_LIBRARY_PATH. Since llvm-symbolizer itself wasn't built with asan, one of these libraries will cause a dynamic linker error like:
/usr/bin/llvm-symbolizer-18: symbol lookup error: /home/runner/work/krb5/krb5/src/./lib/libkrb5support.so.0: undefined symbol: __asan_option_detect_stack_use_after_return
The program then attempts to write to the llvm-symbolizer pipe and gets a SIGPIPE because the subprocess has exited. If SIGPIPE isn't ignored, the process exits immediately without displaying the un-symbolized stack trace.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8lE-P4zYPxj-NciHGcJR4Mjn4kHnndRtgiw52Byh6CmSLttnIkiFKyaafvpCdzJ8U6CmBLJEPH_5IxUydRSxF8SyKl4WKoXe-7Dx2fdTs7KJ2-lK-9cRAzBHBWXMB1bbYBAaNJzRuRM_gWjBUe-UJGchC6BE0jmg12uYCTa_ITpfMaXjgy1A7Q3-jF_J_oKwGCjBQ1weoEYKLXQ_BQUs_M5HvRL7bw6DIhhTjt_0bHH1dZAC_Rw_iMR_UEaHpsTmKxxx8tAwn5clFhprsr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