[llvm] r314535 - [test] Enable LeakSanitizer on 64-bit Darwin ASan llvm builds

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 11:34:42 PDT 2017


https://reviews.llvm.org/D38699

On Mon, Oct 9, 2017 at 2:31 PM, Francis Ricci <francisjricci at gmail.com> wrote:
> I didn't realize it was still broken because I didn't get an email.
> Looks like there's only one leaky test -
> tools/llvm-objdump/macho-LLVM-bundle.test (which doesn't repro
> locally). I'll commit a diff to disable leak checking on that test.
>
> On Mon, Oct 9, 2017 at 2:27 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>> Hi Francis,
>>
>> This commit has broken the ASan bot for almost a week now.
>>
>> Could you fix or revert please?
>>
>> Thanks,
>> -Quentin
>>
>>
>> On Oct 3, 2017, at 11:18 PM, Mike Edwards via llvm-commits
>> <llvm-commits at lists.llvm.org> wrote:
>>
>> Hi,
>> Our Stage 2 ASAN bot
>> (http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/) is having
>> trouble with this commit.
>>
>> I believe this issue lies in this line:
>> Modified: llvm/trunk/utils/lit/lit/llvm/config.py
>> +                    self.with_environment('ASAN_OPTIONS', 'detect_leaks=1',
>> append_path=True)
>>
>> I am pretty sure the append_path=True is causing the output of the function
>> to append the following to the config.environment dict:
>> 'ASAN_OPTIONS': 'detect_leaks=1:.'
>>
>> This output causes an error to be thrown when config.py is run because the
>> extra ':.' appended to the 'detect_leaks=1' value causes an error when
>> parsing the key.  Would it be possible to remove the argument
>> 'append_path=True' from the function call?  I tried commenting the argument
>> out and re-running the lit command and everything worked again as expected.
>> Any help you can provide here would be greatly appreciated.
>>
>> Respectfully,
>> Mike Edwards
>>
>> On Fri, Sep 29, 2017 at 9:51 AM, Francis Ricci via llvm-commits
>> <llvm-commits at lists.llvm.org> wrote:
>>>
>>> Author: fjricci
>>> Date: Fri Sep 29 09:51:50 2017
>>> New Revision: 314535
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=314535&view=rev
>>> Log:
>>> [test] Enable LeakSanitizer on 64-bit Darwin ASan llvm builds
>>>
>>> Summary:
>>> Also disables leak checking on lto tests, due to many leaks reported
>>> in the system's ld64.
>>>
>>> Reviewers: kcc, pcc, bogner, kubamracek
>>>
>>> Subscribers: mehdi_amini, llvm-commits
>>>
>>> Differential Revision: https://reviews.llvm.org/D37781
>>>
>>> Modified:
>>>     llvm/trunk/test/tools/lto/lit.local.cfg
>>>     llvm/trunk/utils/lit/lit/llvm/config.py
>>>
>>> Modified: llvm/trunk/test/tools/lto/lit.local.cfg
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/lto/lit.local.cfg?rev=314535&r1=314534&r2=314535&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/test/tools/lto/lit.local.cfg (original)
>>> +++ llvm/trunk/test/tools/lto/lit.local.cfg Fri Sep 29 09:51:50 2017
>>> @@ -1,2 +1,6 @@
>>>  if not ('ld64_plugin' in config.available_features and 'X86' in
>>> config.root.targets):
>>> -   config.unsupported = True
>>> +    config.unsupported = True
>>> +
>>> +# These tests invoke ld64 from the system, which is not leak-free
>>> +if "Address" in config.llvm_use_sanitizer:
>>> +    config.environment['ASAN_OPTIONS'] = 'detect_leaks=0'
>>>
>>> Modified: llvm/trunk/utils/lit/lit/llvm/config.py
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/llvm/config.py?rev=314535&r1=314534&r2=314535&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/utils/lit/lit/llvm/config.py (original)
>>> +++ llvm/trunk/utils/lit/lit/llvm/config.py Fri Sep 29 09:51:50 2017
>>> @@ -75,6 +75,9 @@ class LLVMConfig(object):
>>>              features.add("long_tests")
>>>
>>>          if target_triple:
>>> +            if re.match(r'^x86_64.*-apple', target_triple):
>>> +                if 'address' in sanitizers:
>>> +                    self.with_environment('ASAN_OPTIONS',
>>> 'detect_leaks=1', append_path=True)
>>>              if re.match(r'^x86_64.*-linux', target_triple):
>>>                  features.add("x86_64-linux")
>>>              if re.match(r'.*-win32$', target_triple):
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>>


More information about the llvm-commits mailing list