[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

Alan Phipps via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 30 11:49:11 PDT 2023


alanphipps added a comment.

> I added steps to download the profile here: https://bugs.chromium.org/p/chromium/issues/detail?id=1485303#c4 
> I think this should be reverted while being investigated: https://github.com/llvm/llvm-project/commit/53a2923bf67bc164558d489493176630123abf7e

Thank you for the repro! It was a huge help. There was in fact a bug in InstrProfReader.cpp where the wrong profile format version was being checked before attempting to read MC/DC bitmap bytes.  The check was added to ensure backward compatibility with older versions.  I fixed that check and added a testcase to ensure v10 of the format can still be handled successfully.

> I just noticed this also broke some lit tests on mac: https://bugs.chromium.org/p/chromium/issues/detail?id=1485487#c0
> That's also visible on greendragon: https://green.lab.llvm.org/green/view/Clang/job/clang-stage1-RA/35721/testReport/

The Mac failures were due a missing adjustment in clang to ensure profile sections are properly page aligned.  When I separated out the patches to make the process easier, that change ended up in https://reviews.llvm.org/D138849 with the other MC/DC clang changes when it should've been included in this patch.  I've added it and verified that the Mac tests pass with this patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138846/new/

https://reviews.llvm.org/D138846



More information about the cfe-commits mailing list