<div dir="ltr">Sorry for the breakage, I didn't get a failure email from the bot [actually I did for the build #3843 but it was unrelated] and was on weekend when you wrote me later.<div><br></div><div>It's a state holiday today as well, so I'll take a closer look tomorrow earliest.</div><div><span style="font-size:13.1999998092651px">Thanks for reverting in the meantime.</span><br><br><div class="gmail_quote">On Sun Feb 22 2015 at 10:01:23 PM Renato Golin <<a href="mailto:renato.golin@linaro.org" target="_blank" class="cremed">renato.golin@linaro.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have reverted on r230179 since other errors were introduced in the<br>
meantime, and I'll try to look into them, as well.<br>
<br>
Please check our full buildbot after you re-commit this.<br>
<br>
<a href="http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full" target="_blank" class="cremed">http://lab.llvm.org:8011/<u></u>build<u></u>ers/clang-cmake-armv7-<u></u>a15-full</a><br>
<br>
cheers,<br>
--renato<br>
<br>
On 21 February 2015 at 15:34, Renato Golin <<a href="mailto:renato.golin@linaro.org" target="_blank" class="cremed">renato.golin@linaro.org</a>> wrote:<br>
> Hi Timur,<br>
><br>
> This commit has broken our buildbot:<br>
><br>
> <a href="http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/3844/steps/ninja%20check%201/logs/AddressSanitizer-arm-linux%3A%3Acontiguous_container_crash.cc" target="_blank" class="cremed">http://lab.llvm.org:8011/<u></u>build<u></u>ers/clang-cmake-armv7-<u></u>a15-<u></u>full/builds/3844/steps/<u></u>ninja%<u></u>20check%201/logs/<u></u>AddressSaniti<u></u>zer-arm-linux%3A%<u></u>3Acontiguous_<u></u>container_crash.<u></u>cc</a><br>
><br>
> It doesn't seem to be your patch specifically, but it has uncovered an<br>
> underlying issue. Can you revert the patch and create a bug, so we can<br>
> investigate on the side, please?<br>
><br>
> thanks,<br>
> --renato<br>
><br>
><br>
><br>
><br>
> On 20 February 2015 at 15:45, Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com" target="_blank" class="cremed">timurrrr@google.com</a>> wrote:<br>
>> Author: timurrrr<br>
>> Date: Fri Feb 20 09:45:51 2015<br>
>> New Revision: 230019<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230019&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-<u></u>pr<u></u>oject?rev=230019&view=rev</a><br>
>> Log:<br>
>> [ASan] Make the argument of '__sanitizer_annotate_<u></u>contiguo<u></u>us_container' is not aligned error message easier to understand<br>
>><br>
>> Modified:<br>
>>     compiler-rt/trunk/lib/asan/<u></u>as<u></u>an_report.cc<br>
>>     compiler-rt/trunk/test/asan/<u></u>T<u></u>estCases/contiguous_<u></u>container_<u></u>crash.cc<br>
>><br>
>> Modified: compiler-rt/trunk/lib/asan/<u></u>asa<u></u>n_report.cc<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_report.cc?rev=230019&r1=230018&r2=230019&view=diff" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-<u></u>pr<u></u>oject/compiler-rt/trunk/lib/<u></u>as<u></u>an/asan_report.cc?rev=<u></u>230019&<u></u>r1=230018&r2=230019&<u></u>view=diff</a><br>
>> ==============================<u></u><u></u>==============================<u></u><u></u>==================<br>
>> --- compiler-rt/trunk/lib/asan/<u></u>asa<u></u>n_report.cc (original)<br>
>> +++ compiler-rt/trunk/lib/asan/<u></u>asa<u></u>n_report.cc Fri Feb 20 09:45:51 2015<br>
>> @@ -834,6 +834,8 @@ void ReportBadParamsToAnnotateConti<u></u><u></u>guous<br>
>>           "      old_mid : %p\n"<br>
>>           "      new_mid : %p\n",<br>
>>           beg, end, old_mid, new_mid);<br>
>> +  if (!IsAligned(beg, SHADOW_GRANULARITY))<br>
>> +    Report("ERROR: beg is not aligned by %d\n", SHADOW_GRANULARITY);<br>
>>    stack->Print();<br>
>>    ReportErrorSummary("bad-__<u></u>sani<u></u>tizer_annotate_contiguous_<u></u>cont<u></u>ainer", stack);<br>
>>  }<br>
>><br>
>> Modified: compiler-rt/trunk/test/asan/<u></u>Te<u></u>stCases/contiguous_<u></u>container_<u></u>crash.cc<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc?rev=230019&r1=230018&r2=230019&view=diff" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-<u></u>pr<u></u>oject/compiler-rt/trunk/<u></u>test/<u></u>asan/TestCases/<u></u>contiguous_<u></u>container_crash.cc?<u></u>rev=230019&<u></u>r1=230018&r2=<u></u>230019&view=diff</a><br>
>> ==============================<u></u><u></u>==============================<u></u><u></u>==================<br>
>> --- compiler-rt/trunk/test/asan/<u></u>Te<u></u>stCases/contiguous_<u></u>container_<u></u>crash.cc (original)<br>
>> +++ compiler-rt/trunk/test/asan/<u></u>Te<u></u>stCases/contiguous_<u></u>container_<u></u>crash.cc Fri Feb 20 09:45:51 2015<br>
>> @@ -1,6 +1,7 @@<br>
>>  // RUN: %clangxx_asan -O %s -o %t<br>
>>  // RUN: not %run %t crash 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s<br>
>> -// RUN: not %run %t bad-bounds 2>&1 | FileCheck --check-prefix=CHECK-BAD %s<br>
>> +// RUN: not %run %t bad-bounds 2>&1 | FileCheck --check-prefix=CHECK-BAD-<u></u>BOUND<u></u>S %s<br>
>> +// RUN: not %run %t bad-alignment 2>&1 | FileCheck --check-prefix=CHECK-BAD-<u></u>ALIGN<u></u>MENT %s<br>
>>  // RUN: env ASAN_OPTIONS=detect_container_<u></u><u></u>overflow=0 %run %t crash<br>
>>  //<br>
>>  // Test crash due to __sanitizer_annotate_<u></u>contiguou<u></u>s_container.<br>
>> @@ -21,21 +22,31 @@ int TestCrash() {<br>
>>    t[60] = 0;<br>
>>    __sanitizer_annotate_<u></u>contiguou<u></u>s_container(&t[0], &t[0] + 100, &t[0] + 100,<br>
>>                                              &t[0] + 50);<br>
>> +// CHECK-CRASH: AddressSanitizer: container-overflow<br>
>>    return (int)t[60 * one];  // Touches the poisoned memory.<br>
>>  }<br>
>><br>
>>  void BadBounds() {<br>
>>    long t[100];<br>
>> +// CHECK-BAD-BOUNDS: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_<u></u>contiguou<u></u>s_container<br>
>>    __sanitizer_annotate_<u></u>contiguou<u></u>s_container(&t[0], &t[0] + 100, &t[0] + 101,<br>
>>                                              &t[0] + 50);<br>
>>  }<br>
>><br>
>> +void BadAlignment() {<br>
>> +  int t[100];<br>
>> +// CHECK-BAD-ALIGNMENT: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_<u></u>contiguou<u></u>s_container<br>
>> +// CHECK-BAD-ALIGNMENT: ERROR: beg is not aligned by 8<br>
>> +  __sanitizer_annotate_<u></u>contiguou<u></u>s_container(&t[1], &t[0] + 100, &t[1] + 10,<br>
>> +                                            &t[0] + 50);<br>
>> +}<br>
>> +<br>
>>  int main(int argc, char **argv) {<br>
>>    assert(argc == 2);<br>
>>    if (!strcmp(argv[1], "crash"))<br>
>>      return TestCrash();<br>
>>    else if (!strcmp(argv[1], "bad-bounds"))<br>
>>      BadBounds();<br>
>> +  else if (!strcmp(argv[1], "bad-alignment"))<br>
>> +    BadAlignment();<br>
>>  }<br>
>> -// CHECK-CRASH: AddressSanitizer: container-overflow<br>
>> -// CHECK-BAD: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_<u></u>contiguou<u></u>s_container<br>
>><br>
>><br>
>> ______________________________<u></u><u></u>_________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank" class="cremed">llvm-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank" class="cremed">http://lists.cs.uiuc.edu/<u></u>mailm<u></u>an/listinfo/llvm-commits</a><br>
</blockquote></div></div></div>