[PATCH] D48446: [ubsan] Add support for reporting diagnostics to a monitor process

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 13:50:29 PDT 2018


kubamracek added inline comments.


================
Comment at: test/ubsan/TestCases/Misc/monitor.cpp:2
+// RUN: %clangxx -w -fsanitize=bool %s -o %t
+// RUN: %run %t 2>&1 | FileCheck %s
+
----------------
thakis wrote:
> This test fails on Windows: https://logs.chromium.org/v/?s=chromium%2Fbb%2Ftryserver.chromium.win%2Fwin_upload_clang%2F361%2F%2B%2Frecipes%2Fsteps%2Fpackage_clang%2F0%2Fstdout
> 
> ```
> $ ":" "RUN: at line 1"
> $ "C:/b/rr/tmpnnvph5/w/src/third_party/llvm-bootstrap/./bin/clang.exe" "-w" "-fsanitize=bool" "C:\b\rr\tmpnnvph5\w\src\third_party\llvm\projects\compiler-rt\test\ubsan\TestCases\Misc\monitor.cpp" "-o" "C:\b\rr\tmpnnvph5\w\src\third_party\llvm-bootstrap\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\monitor.cpp.tmp"
> # command output:
> clang_rt.ubsan_standalone-x86_64.lib(ubsan_monitor.cc.obj) : error LNK2005: __ubsan_on_report already defined in monitor-c1dd53.o
>    Creating library C:\b\rr\tmpnnvph5\w\src\third_party\llvm-bootstrap\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\monitor.cpp.lib and object C:\b\rr\tmpnnvph5\w\src\third_party\llvm-bootstrap\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\monitor.cpp.exp
> monitor-c1dd53.o : warning LNK4217: locally defined symbol __std_terminate imported in function "int `public: static unsigned __int64 __cdecl std::char_traits<char>::length(char const * const)'::`1'::dtor$2" (?dtor$2@?0??length@?$char_traits at D@std@@SA_KQEBD at Z@4HA)
> monitor-c1dd53.o : warning LNK4217: locally defined symbol _CxxThrowException imported in function "public: void __cdecl std::ios_base::clear(int,bool)" (?clear at ios_base@std@@QEAAXH_N at Z)
> C:\b\rr\tmpnnvph5\w\src\third_party\llvm-bootstrap\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\monitor.cpp.tmp : fatal error LNK1169: one or more multiply defined symbols found
> # command stderr:
> clang.exe: error: linker command failed with exit code 1169 (use -v to see invocation)
> ```
> 
> I'll note that no other ubsan test includes iostream. clang tests at least try to not use system headers; I'm guessing this is probably true for compiler-rt tests as well?
> 
> If there's no quick fix, please revert while investigating to get the build back to green for now.
> 
> (That bot uses msvc2017; the llvm buildbot bots maybe use something older.)
@vsk, I guess this is because of the weak definition of `__ubsan_on_report`. Should we just mark the test as `UNSUPPORTED: win32`?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48446





More information about the llvm-commits mailing list