<div dir="ltr">Thank you Douglas. Committed as r328630.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 26, 2018 at 10:08 PM,  <span dir="ltr"><<a href="mailto:douglas.yung@sony.com" target="_blank">douglas.yung@sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_-7755086739759068935WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Aleksey,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I think you need to make it slightly more generous with what it accepts. The output I am seeing generated on my local machine is slightly different and still
 failed when I applied your suggested fix.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">For reference, here is the error message as it appeared on my machine (the previous output was from our build bot):<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">Command Output (stderr):<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">--<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">/home/dyung/src/git/dev/llvm/<wbr>projects/compiler-rt/test/<wbr>hwasan/TestCases/use-after-<wbr>free.cc:31:12: error: expected string not found in input<u></u><u></u></span></p><span class="">
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">// CHECK: #0 {{.*}} in free {{.*}}hwasan_interceptors.cc<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">           ^<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><stdin>:9:2: note: scanning from here<u></u><u></u></span></p>
</span><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">#0 0x563436478410 in __interceptor_cfree.<wbr>localalias.76 /home/dyung/src/git/dev/llvm/<wbr>projects/compiler-rt/lib/<wbr>hwasan/hwasan_interceptors.cc:<wbr>183<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">^<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><stdin>:9:97: note: possible intended match here<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">#0 0x563436478410 in __interceptor_cfree.<wbr>localalias.76 /home/dyung/src/git/dev/llvm/<wbr>projects/compiler-rt/lib/<wbr>hwasan/hwasan_interceptors.cc:<wbr>183<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I found that if I modified the CHECK line to contain “{{.*}}free{{.*}} the test passes on my machine, and presumably would also pass on our build bot.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Do you think that you could commit that change if you feel it is okay and then I can follow up with you offline to try and determine what is happening here?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Douglas Yung<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Aleksey Shlyapnikov [mailto:<a href="mailto:alekseys@google.com" target="_blank">alekseys@google.com</a>]
<br>
<b>Sent:</b> Monday, March 26, 2018 19:48<br>
<b>To:</b> Yung, Douglas<br>
<b>Cc:</b> llvm-commits<br>
<b>Subject:</b> Re: [compiler-rt] r328407 - [HWASan] Fix use-after-free.cc test on x86-64<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Thank you for the report and sorry for the trouble, Douglas.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Not sure what is going wrong and more details about your environment would certainly help. The test output before FileCheck would also be helpful.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I think making that CHECK more generous will resolve the problem, like this:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Arial","sans-serif";color:#222222;background:white"> // CHECK: #0 {{.*}} in
</span><span style="font-family:"Arial","sans-serif";color:#222222;background:white">{{.*}}</span><span style="font-size:9.5pt;font-family:"Arial","sans-serif";color:#222222;background:white">free {{.*}}hwasan_interceptors.cc</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">but I'd still like to know what causes the difference in output.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Mar 26, 2018 at 6:25 PM, <<a href="mailto:douglas.yung@sony.com" target="_blank">douglas.yung@sony.com</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal">Hi Alex,<br>
<br>
This test is still failing on our internal build bot which simply does a x86-64 linux build/test of each upstream commit. I would point you to a public build bot that shows the failure, but unfortunately I don't seem to find any. I have been able to reproduce
 the failure on my linux box outside of the bot using the same build/test commands, so it doesn't seem to be a problem specific to that one machine.<br>
<br>
For reference, here is the test output:<br>
<br>
/home/siadmin/jenkins/w/<wbr>opensource/opensource_build/<wbr>llvm/projects/compiler-rt/<wbr>test/hwasan/TestCases/use-<wbr>after-free.cc:31:12: error: expected string not found in input<br>
 // CHECK: #0 {{.*}} in free {{.*}}hwasan_interceptors.cc<br>
           ^<br>
<stdin>:9:2: note: scanning from here<br>
 #0 0x7fb5893a3fd8 in __interceptor_free /home/siadmin/jenkins/w/<wbr>opensource/opensource_build/<wbr>llvm/projects/compiler-rt/lib/<wbr>hwasan/hwasan_interceptors.cc:<wbr>176:3<br>
 ^<br>
<stdin>:9:110: note: possible intended match here<br>
 #0 0x7fb5893a3fd8 in __interceptor_free /home/siadmin/jenkins/w/<wbr>opensource/opensource_build/<wbr>llvm/projects/compiler-rt/lib/<wbr>hwasan/hwasan_interceptors.cc:<wbr>176:3<br>
<br>
Any ideas on why this might be failing? If this isn't enough, I can provide you with more details of my environment and the build/test command lines to help you reproduce the problem.<br>
<br>
Douglas Yung<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
> -----Original Message-----<br>
> From: llvm-commits [mailto:<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@<wbr>lists.llvm.org</a>] On Behalf Of<br>
> Alex Shlyapnikov via llvm-commits<br>
> Sent: Friday, March 23, 2018 19:11<br>
> To: <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> Subject: [compiler-rt] r328407 - [HWASan] Fix use-after-free.cc test on x86-64<br>
><br>
> Author: alekseyshl<br>
> Date: Fri Mar 23 19:10:49 2018<br>
> New Revision: 328407<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=328407&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-<wbr>project?rev=328407&view=rev</a><br>
> Log:<br>
> [HWASan] Fix use-after-free.cc test on x86-64<br>
><br>
> Differential Revision: <a href="https://reviews.llvm.org/D44705" target="_blank">
https://reviews.llvm.org/<wbr>D44705</a><br>
><br>
> Modified:<br>
>     compiler-rt/trunk/test/<wbr>hwasan/TestCases/use-after-<wbr>free.cc<br>
><br>
> Modified: compiler-rt/trunk/test/hwasan/<wbr>TestCases/use-after-free.cc<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/compiler-</a><br>
> rt/trunk/test/hwasan/<wbr>TestCases/use-after-<br>
> free.cc?rev=328407&r1=328406&<wbr>r2=328407&view=diff<br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- compiler-rt/trunk/test/hwasan/<wbr>TestCases/use-after-free.cc (original)<br>
> +++ compiler-rt/trunk/test/hwasan/<wbr>TestCases/use-after-free.cc Fri Mar 23<br>
> 19:10:49 2018<br>
> @@ -32,7 +32,7 @@ int main() {<br>
>    // CHECK: #1 {{.*}} in main {{.*}}use-after-free.cc:16<br>
><br>
>    // CHECK: previously allocated here:<br>
> -  // CHECK: #0 {{.*}} in __interceptor_malloc {{.*}}hwasan_interceptors.cc<br>
> +  // CHECK: #0 {{.*}} in {{.*}}malloc {{.*}}hwasan_interceptors.cc<br>
>    // CHECK: #1 {{.*}} in main {{.*}}use-after-free.cc:15<br>
><br>
>    // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in main<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">
http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>