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

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 14:01:42 PDT 2018



> On Jun 25, 2018, at 1:53 PM, Vedant Kumar <vsk at apple.com> wrote:
> 
> 
> 
>> On Jun 25, 2018, at 1:46 PM, Nico Weber via Phabricator <reviews at reviews.llvm.org> wrote:
>> 
>> thakis 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
>> +
>> ----------------
>> 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
> 
> __ubsan_on_report might need to be marked weak & handled that way in order for this test to work on Windows. Marking the test unsupported on Windows sounds fine to me -- I'll do that now. I don't know of any simple alternatives.

I added the test suppression in r335523.

vedant

> 
> 
>>  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?
> 
> The use of iostream hasn't caused problems yet. As at least the libfuzzer and the xray tests also use iostream, I'd rather not remove the usage.
> 
> vedant
> 
>> 
>> 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.)
>> 
>> 
>> Repository:
>> rCRT Compiler Runtime
>> 
>> https://reviews.llvm.org/D48446 <https://reviews.llvm.org/D48446>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180625/ec967cec/attachment.html>


More information about the llvm-commits mailing list