<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello</p>
<p>Could you please open a bug <br>
</p>
<p><a class="moz-txt-link-freetext" href="https://bugs.llvm.org/enter_bug.cgi?product=Packaging">https://bugs.llvm.org/enter_bug.cgi?product=Packaging</a></p>
<p><br>
</p>
<p>Thanks</p>
<p>Sylvestre</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 15/05/2020 à 17:36, Joachim Protze a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:5d6416c3-9153-4e48-b8f2-3aad9f13c909@itc.rwth-aachen.de">Dear
LLVM package maintainers,
<br>
<br>
I'm glad, that libarcher made it into a debian package. But
unfortunately it doesn't work.
<br>
<br>
The idea of Archer is to complement ThreadSanitizer and provide
the synchronization semantics for OpenMP. In a vanilla build of
LLVM with openmp, libarcher is loaded by the OpenMP runtime
(libomp.so) automatically and checks whether the TSan library is
present in the execution:
<br>
<br>
$ export ARCHER_OPTIONS=verbose=1
<br>
$ clang -fopenmp -fsanitize=thread red-norace.c -g
<br>
$ OMP_NUM_THREADS=2 ./a.out
<br>
Archer detected OpenMP application with TSan, supplying OpenMP
synchronization semantics
<br>
Sum: 4999950000
<br>
<br>
Using clang-10 from the package, there are several issues. First,
the archer library is not found as the library is not in the dl
search path
<br>
$ clang-10 -fopenmp -fsanitize=thread red-norace.c -g
<br>
$ OMP_NUM_THREADS=2 ./a.out
<br>
... WARNING: ThreadSanitizer: data race ...
<br>
<br>
Creating a link in /lib/x86_64-linux-gnu should help for this.
<br>
<br>
The next issue (after I added the link):
<br>
$ OMP_NUM_THREADS=2 ./a.out
<br>
Archer detected OpenMP application without TSan stopping operation
<br>
... WARNING: ThreadSanitizer: data race ...
<br>
<br>
I could not figure out, why the archer library does not use the
exported dynamic symbols from the tsan runtime, which is
statically linked into the application:
<br>
<br>
$ readelf --dyn-syms a.out | grep RunningOnValgrind
<br>
529: 000000000048f6f0 18 FUNC GLOBAL DEFAULT 13
RunningOnValgrind
<br>
$ readelf --dyn-syms /usr/lib/llvm-10/lib/libarcher.so | grep
RunningOnValgrind
<br>
61: 0000000000002770 10 FUNC WEAK DEFAULT 12
RunningOnValgrind
<br>
$ readelf --dyn-syms /home/.../clang/10.0/lib/libarcher.so | grep
RunningOnValgrind
<br>
64: 0000000000002590 10 FUNC WEAK DEFAULT 12
RunningOnValgrind
<br>
<br>
I can successfully use clang-10 with my vanilla build of
libarcher. So, it seems like there is something funny going on
with libarcher from the deb package.
<br>
<br>
Finally, I'm not sure why the library should not be installed if
compiler and OpenMP runtime are installed. I can understand that
developers packages are not installed by default, but a compiler
is typically installed by developers?
<br>
<br>
Thanks in advance for looking into this.
<br>
<br>
Best
<br>
Joachim
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Pkg-llvm-team mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pkg-llvm-team@alioth-lists.debian.net">Pkg-llvm-team@alioth-lists.debian.net</a>
<a class="moz-txt-link-freetext" href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-llvm-team">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-llvm-team</a></pre>
</blockquote>
</body>
</html>