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

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 22:51:53 PST 2017


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





More information about the llvm-commits mailing list