[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:49:53 PDT 2017


Yeah, I just verified that only the most recent failing build (#5339)
had more than one failing test, the two before that (#5338 and #5337)
had only the single failure. I haven't had any commits in that time
frame, so something else must have broken separately from my patch.

On Mon, Oct 9, 2017 at 2:46 PM, Francis Ricci <francisjricci at gmail.com> wrote:
> The error output for that build:
> 1 warning(s) in tests.
> Testing Time: 14689.69s
> ********************
> Failing Tests (1):
>     LLVM :: tools/llvm-objdump/macho-LLVM-bundle.test
>
>   Expected Passes    : 38761
>   Expected Failures  : 253
>   Unsupported Tests  : 973
>   Unexpected Failures: 1
> FAILED: CMakeFiles/check-all
>
>
> On Mon, Oct 9, 2017 at 2:46 PM, Francis Ricci <francisjricci at gmail.com> wrote:
>> I believe that was only the most recent test run. Most of the test
>> runs that have failed only had a single error:
>> http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/5337/changes
>>
>> `detect_leaks is not supported on this platform.` generally means that
>> you're using the system clang instead of the bootstrapped clang
>> (because LSan wasn't added until the most recent release)
>>
>> On Mon, Oct 9, 2017 at 2:42 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>>> Hmm, the report says
>>> Unexpected Failures: 4762
>>>
>>> It does not seem to be just this one test.
>>> I talked with Anna and she said that detecting leaks is not supported on the
>>> Mac [with ASan].
>>> Which matches what I see locally:
>>>
>>> ==5185==AddressSanitizer: detect_leaks is not supported on this platform.
>>>
>>>
>>> I admit I didn’t follow this works and my config may be out of date, still
>>> there is more than one test failing on the bot :).
>>>
>>>
>>> On Oct 9, 2017, at 11:31 AM, 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