<p dir="ltr">Hi,</p>
<p dir="ltr">I first searched the related patches, then tested them on 3.9. I wrote the message without trying them on 3.8, I did not know if the first patch is required.<br>
Why didn't you run 'quilt push -a' before committing them? 😁</p>
<div class="gmail_extra"><br><div class="gmail_quote">Am 11.11.2016 5:07 nachm. schrieb "Sylvestre Ledru" <<a href="mailto:s@mozilla.com">s@mozilla.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah, my bad. Why did you included the third patch btw?<br>
<br>
thanks again<br>
<br>
<br>
Le 11/11/2016 à 17:02, Norbert Lange a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, you messed up the order, look in the series file from the attachment.<br>
You only need those two patches (in this order), third is already<br>
included in 3.8.1:<br>
<br>
upstream-msan-prevent-initiali<wbr>zation-failure.diff<br>
upstream-asan-msan-fix-realloc<wbr>ation-logic.diff<br>
<br>
if you want you can refresh them with quilt, but they apply cleanly<br>
for me (with some other linenumbers)<br>
<br>
2016-11-11 16:23 GMT+01:00 Sylvestre Ledru <<a href="mailto:s@mozilla.com" target="_blank">s@mozilla.com</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I could apply upstream-msan-prevent-initiali<wbr>zation-failure.diff  to 3.8 but<br>
not the two others, could you share yours?<br>
Thanks<br>
S<br>
<br>
<br>
Le 11/11/2016 à 09:52, Norbert Lange a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The same 2 patches also apply to toolchain 3.8.1-15 (with some<br>
offsets), but I haven`t testing building it<br>
<br>
2016-11-11 1:25 GMT+01:00 Norbert Lange <<a href="mailto:nolange79@gmail.com" target="_blank">nolange79@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
BTW. make check-sanitizer would have likely found this issue, might<br>
want to enable it?<br>
I believe it knows which sanitizers should work<br>
<br>
2016-11-11 0:46 GMT+01:00 Norbert Lange <<a href="mailto:nolange79@gmail.com" target="_blank">nolange79@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Tags: patch<br>
<br>
<br>
Hi,<br>
<br>
I got it working, seems that from the 3 related patched, one is already<br>
applied.<br>
The attached archive is the 3 patches and a edited "series" file,<br>
it should be painless for you to integrate it into the debian/patches<br>
directory for 3.9<br>
<br>
I did not try with 3.8 yet (possibly more difficult), building llvm<br>
takes quite a while.<br>
<br>
Kind Regards,<br>
Norbert<br>
<br>
2016-11-09 11:04 GMT+01:00 Norbert Lange <<a href="mailto:nolange79@gmail.com" target="_blank">nolange79@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
researched a bit further and the same compiled programm will run fine<br>
on debian jessie.<br>
I tracked it down to being caused by a newer glibc version [1][2],<br>
apparently during loading of shared libs, glibc can now allocate<br>
memory which messes up sanitzers (mostly in more subtile ways than the<br>
memory sanitizer).<br>
<br>
The result is, that if stretch will ship with the current glibc, clang<br>
and gcc (I dont think its patched there either), then the sanitizers<br>
won`t be usable.<br>
1) revert the fix in glibc. Would have the advantage that "sanitized"<br>
binaries compiled from current and older clang/gcc versions will work<br>
2) adopt the fixed from upstream [3][4] (possibly more) into clang<br>
(and possibly gcc).<br>
or maybe both?<br>
<br>
Kind Regards,<br>
Norbert<br>
<br>
PS. shouldn`t the testsuite catch these bugs?<br>
<br>
[1]<br>
<a href="https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=24e2b1cede1952d7d4411a3cafd25dd8593dab9f" rel="noreferrer" target="_blank">https://sourceware.org/git/git<wbr>web.cgi?p=glibc.git;h=24e2b1ce<wbr>de1952d7d4411a3cafd25dd8593dab<wbr>9f</a><br>
[2] <a href="https://llvm.org/bugs/show_bug.cgi?id=27310" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_bug<wbr>.cgi?id=27310</a><br>
[3]<br>
<a href="https://github.com/llvm-mirror/compiler-rt/commit/827ea206c1078fc7c7da287984a7ba4563390589" rel="noreferrer" target="_blank">https://github.com/llvm-mirror<wbr>/compiler-rt/commit/827ea206c1<wbr>078fc7c7da287984a7ba4563390589</a><br>
[4]<br>
<a href="https://github.com/llvm-mirror/compiler-rt/commit/570ee9dd7a6f90b0370a86535cbde6738d0ccf67" rel="noreferrer" target="_blank">https://github.com/llvm-mirror<wbr>/compiler-rt/commit/570ee9dd7a<wbr>6f90b0370a86535cbde6738d0ccf67</a><br>
<br>
2016-10-31 21:43 GMT+01:00 Norbert Lange <<a href="mailto:nolange79@gmail.com" target="_blank">nolange79@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, 31 Oct 2016 08:38:21 +0100 Sylvestre Ledru<br>
<<a href="mailto:sylvestre@debian.org" target="_blank">sylvestre@debian.org</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le 31/10/2016 à 00:39, Norbert Lange a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Package: clang-3.9<br>
Version: 1:3.9-2<br>
Severity: normal<br>
<br>
Dear Maintainer,<br>
<br>
The memory sanitizer is unusable as it segfaults during<br>
initialization.<br>
To reproduce:<br>
echo 'int main() { return 0; }' >/tmp/test.c<br>
clang -fsanitize=memory -o test test.c<br>
</blockquote>
can you try with clang-3.9 instead?<br>
</blockquote>
Same thing, output:<br>
<br>
$ clang-3.9 -fsanitize=memory -o test test.c -v<br>
clang version 3.9.0-2 (tags/RELEASE_390/final)<br>
Target: x86_64-pc-linux-gnu<br>
Thread model: posix<br>
InstalledDir: /usr/bin<br>
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux<wbr>-gnu/6<br>
Found candidate GCC installation:<br>
/usr/bin/../lib/gcc/i686-linux<wbr>-gnu/6.2.0<br>
Found candidate GCC installation:<br>
/usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/5<br>
Found candidate GCC installation:<br>
/usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/5.4.1<br>
Found candidate GCC installation:<br>
/usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/6<br>
Found candidate GCC installation:<br>
/usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/6.2.0<br>
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6<br>
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.<wbr>2.0<br>
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/<wbr>5<br>
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/<wbr>5.4.1<br>
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/<wbr>6<br>
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/<wbr>6.2.0<br>
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/6.2.0<br>
Candidate multilib: .;@m64<br>
Candidate multilib: 32;@m32<br>
Candidate multilib: x32;@mx32<br>
Selected multilib: .;@m64<br>
   "/usr/lib/llvm-3.9/bin/clang" -cc1 -triple x86_64-pc-linux-gnu<br>
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier<br>
-discard-value-names -main-file-name test.c -mrelocation-model static<br>
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose<br>
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu<br>
x86-64 -v -dwarf-column-info -debugger-tuning=gdb -resource-dir<br>
/usr/lib/llvm-3.9/bin/../lib/c<wbr>lang/3.9.0 -internal-isystem<br>
/usr/local/include -internal-isystem<br>
/usr/lib/llvm-3.9/bin/../lib/c<wbr>lang/3.9.0/include<br>
-internal-externc-isystem /usr/include/x86_64-linux-gnu<br>
-internal-externc-isystem /include -internal-externc-isystem<br>
/usr/include -fdebug-compilation-dir /tmp -ferror-limit 19<br>
-fmessage-length 135 -fsanitize=memory<br>
<br>
-fsanitize-blacklist=/usr/lib/<wbr>llvm-3.9/bin/../lib/clang/3.9.<wbr>0/msan_blacklist.txt<br>
-fno-assume-sane-operator-new -fobjc-runtime=gcc<br>
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/test-2d4d2c.o -x<br>
c test.c<br>
clang -cc1 version 3.9.0 based upon LLVM 3.9.0 default target<br>
x86_64-pc-linux-gnu<br>
ignoring nonexistent directory "/include"<br>
#include "..." search starts here:<br>
#include <...> search starts here:<br>
   /usr/local/include<br>
   /usr/lib/llvm-3.9/bin/../lib/<wbr>clang/3.9.0/include<br>
   /usr/include/x86_64-linux-gnu<br>
   /usr/include<br>
End of search list.<br>
   "/usr/bin/ld" --hash-style=both --eh-frame-hdr -m elf_x86_64<br>
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test<br>
<br>
/usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/6.2.0/../../../x86_64-<wbr>linux-gnu/crt1.o<br>
<br>
/usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/6.2.0/../../../x86_64-<wbr>linux-gnu/crti.o<br>
/usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/6.2.0/crtbegin.o<br>
-L/usr/bin/../lib/gcc/x86_64-l<wbr>inux-gnu/6.2.0<br>
-L/usr/bin/../lib/gcc/x86_64-l<wbr>inux-gnu/6.2.0/../../../x86_64<wbr>-linux-gnu<br>
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu<br>
-L/usr/bin/../lib/gcc/x86_64-l<wbr>inux-gnu/6.2.0/../../..<br>
-L/usr/lib/llvm-3.9/bin/../lib -L/lib -L/usr/lib -whole-archive<br>
<br>
/usr/lib/llvm-3.9/bin/../lib/c<wbr>lang/3.9.0/lib/linux/libclang_<wbr>rt.msan-x86_64.a<br>
-no-whole-archive<br>
<br>
--dynamic-list=/usr/lib/llvm-3<wbr>.9/bin/../lib/clang/3.9.0/lib/<wbr>linux/libclang_rt.msan-x86_64.<wbr>a.syms<br>
/tmp/test-2d4d2c.o --no-as-needed -lpthread -lrt -lm -ldl -lgcc<br>
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s<br>
--no-as-needed /usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/6.2.0/crtend.o<br>
<br>
/usr/bin/../lib/gcc/x86_64-lin<wbr>ux-gnu/6.2.0/../../../x86_64-<wbr>linux-gnu/crtn.o<br>
</blockquote></blockquote></blockquote></blockquote></blockquote>
<br>
<br>
</blockquote></blockquote>
<br>
</blockquote></div></div>