[cfe-users] Silencing errors in TSAN

2020-01-29 Thread Kyle Edwards via cfe-users
Hello all,

I am attempting to build OpenMPI with TSAN enabled (to TSAN-itize a
project that uses OpenMPI), and am finding that OpenMPI throws lots of
errors in TSAN (not surprising.) I am attempting to build OpenMPI with
the following blacklist:

src:*

However, I am still getting errors when I run mpiexec. I've reduced it
down to the following minimal example:

--

#include 

#include 

static int my_pipe[2];

int main()
{
  pipe(my_pipe);
  std::thread([]() {
    std::this_thread::sleep_for(std::chrono::seconds(1));
    close(my_pipe[1]);
  }).detach();
  write(my_pipe[1], "Hello", 5);
  std::this_thread::sleep_for(std::chrono::seconds(2));
  return 0;
}

--

Even when I compile this with -fsanitize-blacklist=blacklist.txt, I
still get a warning about a race condition. Is there some way I can
silence this, preferably without patching OpenMPI? Is this a bug in
TSAN?

Kyle
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] clangd --clang-tidy: // NOLINT only works sometimes

2020-01-29 Thread Sam McCall via cfe-users
+clangd-dev

The issue here is that the warned construct
(CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) is inside a macro. clangd checks for
the NOLINT comment only where the code is spelled (on the macro
definition), clang-tidy checks both the spelling location and the expansion
location (curl_global_init call).

The inconsistency is a bug: filed
https://github.com/clangd/clangd/issues/266

Cheers, Sam


On Sun, Jan 26, 2020 at 10:15 PM David Blaikie  wrote:

> +Sam in case he's got some thoughts or can rope in others who might.
>
> On Sun, Jan 26, 2020 at 1:03 PM tastytea via cfe-users <
> cfe-users@lists.llvm.org> wrote:
>
>> Hi,
>> I recently started using clangd (9.0.1) with --clang-tidy. I noticed
>> that suppressing diagnostics only sometimes works.
>>
>> For example:
>> using std::array; // NOLINT(misc-unused-using-decls)
>> works with clang-tidy and clangd, but
>> curl_global_init(CURL_GLOBAL_ALL); // NOLINT(hicpp-signed-bitwise)
>> works only with clang-tidy, not with clangd.
>>
>> I found the review[1] of the feature when it was introduced but I don't
>> really understand what's going on there…
>>
>> Is this a bug or can some warnings not be suppressed?
>>
>> Kind regards, tastytea
>>
>> [1] 
>> ___
>> cfe-users mailing list
>> cfe-users@lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>>
>
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users