[PATCH] D28502: [compiler-rt] [Interception] Properly check for export table's size before referring to its elements.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 11:11:18 PST 2017


gtest seems like the best approach for testing internal implementation
details IMO

On Wed, Jan 25, 2017 at 10:51 PM Kuba (Brecka) Mracek via Phabricator <
reviews at reviews.llvm.org> wrote:

> kubamracek added a comment.
>
> In https://reviews.llvm.org/D28502#657267, @mpividori wrote:
>
> > @kubamracek  Thanks for your comments. Yes, I had to revert it because
> of the cmake code for the test. I need to review it.
> >  As this was a bug in the interception library, I think we should
> include it in the interception directory, instead of asan library.
> >  I discovered this bug when updating sanitizer coverage for windows. In
> https://reviews.llvm.org/D29168  , when asan dll is initialized, I
> analyse the exported symbols in the main executable. It was failing when
> the main executable doesn't export any symbol.  Then I realized there was a
> bug in the interception library.
> >  As I considered it a "regression test", and I read in the
> documentation: http://llvm.org/docs/TestingGuide.html  that regression
> tests should go in the `repository/test` folder, I decided to include the
> test there.
>
>
> The "interception" library isn't provided to user code directly.  Either
> write a gtest-style unit test instead (in `lib/interception/tests`) or put
> the lit test into an existing sanitizer that is affected by the bug.
> Adding a lit test suite that links against internals is just wrong.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D28502
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170126/009cbfd1/attachment.html>


More information about the llvm-commits mailing list