[compiler-rt] r251447 - [asan] On OS X, log reports to syslog and os_trace

H.J. Lu via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 16:28:55 PDT 2015


On Tue, Oct 27, 2015 at 3:57 PM, Kuba Brecka <jbrecka at apple.com> wrote:
> It caused:
>
> /tmp/gotsan.wmNri3GVMz/race_linux_amd64.syso: In function
> `__sanitizer::SharedPrintfCode(bool, char const*, __va_list_tag*)':
> gotsan.cc:(.text+0x4a85): undefined reference to
> `__sanitizer::WriteToSyslog(char const*)'
> collect2: error: ld returned 1 exit status
> @
>
> on Fedora 22.
>
>
> It looks like the issue is in lib/tsan/go/buildgo.sh, which doesn’t even
> build sanitizer_common_libcdep.cc...
>
> Could you try adding it to buildgo.sh’s list of Linux sources?  If the fix
> is not that easy, we can revert this patch, but since this looks like it’s a
> Go-specific Linux-specific failure, it would be great if you could help us
> with triaging the failure.
>
> Thanks,
> Kuba
>

After applying:

diff --git a/lib/tsan/go/buildgo.sh b/lib/tsan/go/buildgo.sh
index a7e12f1..f34b23c 100755
--- a/lib/tsan/go/buildgo.sh
+++ b/lib/tsan/go/buildgo.sh
@@ -40,6 +40,7 @@ if [ "`uname -a | grep Linux`" != "" ]; then
   SRCS="
      $SRCS
      ../rtl/tsan_platform_linux.cc
+     ../../sanitizer_common/sanitizer_common_libcdep.cc
      ../../sanitizer_common/sanitizer_posix.cc
      ../../sanitizer_common/sanitizer_posix_libcdep.cc
      ../../sanitizer_common/sanitizer_procmaps_common.cc

I got

libRTSanitizerCommon.test.nolibc.x86_64.a(sanitizer_printf.cc.o): In
function `__sanitizer::SharedPrintfCode(bool, char const*,
__va_list_tag*)':
/export/gnu/import/git/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_printf.cc:281:
undefined reference to `__sanitizer::ShouldLogAfterPrintf()'
clang-3.8: error: linker command failed with exit code 1 (use -v to
see invocation)
projects/compiler-rt/lib/sanitizer_common/tests/CMakeFiles/Sanitizer-x86_64-Test-Nolibc.dir/build.make:59:
recipe for target
'projects/compiler-rt/lib/sanitizer_common/tests/CMakeFiles/Sanitizer-x86_64-Test-Nolibc'
failed
gmake[4]: *** [projects/compiler-rt/lib/sanitizer_common/tests/CMakeFiles/Sanitizer-x86_64-Test-Nolibc]
Error 1



-- 
H.J.


More information about the llvm-commits mailing list