[PATCH] D54918: Apply clang-format to GenericTaintChecker.cpp

2018-11-27 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo accepted this revision. gerazo added a comment. This revision is now accepted and ready to land. Looks correct clang-format to me. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54918/new/ https://reviews.llvm.org/D54918 _

[PATCH] D49792: [ASTmporter] SourceRange-free function parameter checking for declarations

2018-07-25 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo created this revision. gerazo added reviewers: a.sidorin, r.stahl. Herald added a subscriber: cfe-commits. The previous code which avoided infinite recursion (because of reparsing declarations in function parameter lists) contained SourceRange dependent code which had some problems when p

[PATCH] D47946: [ASTImporter] Fix infinite recursion on function import with struct definition in parameters

2018-07-12 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. @martong I don't have commit rights. Thanks for your help in advance. https://reviews.llvm.org/D47946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47946: [ASTImporter] Fix infinite recursion on function import with struct definition in parameters

2018-07-11 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo updated this revision to Diff 154991. gerazo marked an inline comment as done. gerazo added a comment. Minor fixes for Aleksei's comments. https://reviews.llvm.org/D47946 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp ==

[PATCH] D47946: [ASTImporter] Fix infinite recursion on function import with struct definition in parameters

2018-07-11 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked 2 inline comments as done. gerazo added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:234 +assert(ToAST); +createVirtualFileIfNeeded(ToAST.get(), It->FileName, It->Code); +return &*It; a.sidorin wrote: > Can we move the

[PATCH] D47946: [ASTmporter] Fix infinite recursion on function import with struct definition in parameters

2018-07-04 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. @a.sidorin what do you think? https://reviews.llvm.org/D47946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47946: [ASTmporter] Fix infinite recursion on function import with struct definition in parameters

2018-06-20 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo updated this revision to Diff 152055. gerazo added a comment. Added @martong 's suggestions. https://reviews.llvm.org/D47946 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp

[PATCH] D47946: [ASTmporter] Fix infinite recursion on function import with struct definition in parameters

2018-06-15 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo updated this revision to Diff 151533. gerazo added a comment. Updated to not conflict with and use the stuff implemented in https://reviews.llvm.org/D47445 (so became a bit smaller) Now, it is ready for a review. Enjoy! https://reviews.llvm.org/D47946 Files: lib/AST/ASTImporter.cpp

[PATCH] D47946: [ASTmporter] Fix infinite recursion on function import with struct definition in parameters

2018-06-12 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. In https://reviews.llvm.org/D47946#1127679, @balazske wrote: > Problem: This change interferes with https://reviews.llvm.org/D47445. > Probably that should be committed, it is approved already. Ok. I'll wait for the other thing to be committed and I will rework this im

[PATCH] D47946: [ASTmporter] Fix infinite recursion on function import with struct definition in parameters

2018-06-08 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo created this revision. gerazo added reviewers: a.sidorin, r.stahl. Herald added a subscriber: cfe-commits. Importing a function having a struct definition in the parameter list causes a crash in the importer via infinite recursion. This patch avoids the crash and reports such functions as

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-02-12 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added inline comments. Comment at: tools/scan-build-py/libscanbuild/analyze.py:702 + # To have good results from static analyzer certain compiler options shall be george.karpenkov wrote: > This blank line should not be in this PR. Scheduled to be done.

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-12-15 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. In https://reviews.llvm.org/D30691#954740, @george.karpenkov wrote: > I've tried using the patch, and I got blocked at the following: CTU options > are only exposed when one goes through `analyze-build` frontend, which > requires `compile_commands.json` to be present. I'

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-12-11 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added inline comments. Comment at: tools/scan-build-py/libscanbuild/analyze.py:44 +CTU_FUNCTION_MAP_FILENAME = 'externalFnMap.txt' +CTU_TEMP_FNMAP_FOLDER = 'tmpExternalFnMaps' george.karpenkov wrote: > gerazo wrote: > > george.karpenkov wrote: > > > What

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-12-06 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. The code modifications are coming soon (after doing some extensive testing) for the scan-build part. Comment at: tools/scan-build-py/libscanbuild/analyze.py:223 +ctu_config = get_ctu_config(args) +if ctu_config.collect: +shutil.rmtree(ct

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-11-29 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. Thanks George for the review. I will start working on the code right away. I've tried to answer the simpler cases. Comment at: tools/scan-build-py/libscanbuild/analyze.py:44 +CTU_FUNCTION_MAP_FILENAME = 'externalFnMap.txt' +CTU_TEMP_FNMAP_FOLDER = 'tm

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-06-14 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. Before abandoning this patch and rewriting it, I would like to get a thumbs up for my plans: I will reimplement all functionality included here but without creating a new checker. Some parts which relate to specific checkers will be put into the corresponding checkers (l

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-03-31 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added inline comments. Comment at: tools/xtu-analysis/xtu-analyze.py:29 + +threading_factor = int(multiprocessing.cpu_count() * 1.5) +analyser_output_formats = ['plist-multi-file', 'plist', 'plist-html', danielmarjamaki wrote: > does this mean that if ther

[PATCH] D30831: [ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operands

2017-03-13 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked an inline comment as done. gerazo added inline comments. Comment at: lib/AST/ASTImporter.cpp:5221 IdentifierInfo *ToII = Importer.Import(S->getOutputIdentifier(I)); -if (!ToII) - return nullptr; +// ToII is nullptr when no symbolic name is given fo

[PATCH] D30831: [ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operands

2017-03-13 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo updated this revision to Diff 91541. gerazo added a comment. Better check not letting a real import problem passing through https://reviews.llvm.org/D30831 Files: lib/AST/ASTImporter.cpp test/ASTMerge/asm/Inputs/asm-function.cpp test/ASTMerge/asm/test.cpp Index: test/ASTMerge/asm

[PATCH] D30831: [ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operands

2017-03-10 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo created this revision. Do not drop the import of the whole function just because an asm statement in it has some missing symbolic names. https://reviews.llvm.org/D30831 Files: lib/AST/ASTImporter.cpp test/ASTMerge/asm/Inputs/asm-function.cpp test/ASTMerge/asm/test.cpp Index: tes

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-03-10 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. > Stepping back a bit, what do you consider "dirty" vs "clean"? It seems that > you are looking for prove that the values are known to be within the bounds > of min and max int values. What happens if there is a comparison to an > unknown symbolic value? Should that be c

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-03-03 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked an inline comment as done. gerazo added a comment. Hmm... I am thinking on this issue for a week now... I've played with the idea of implementing cleansing rules in GenericTaintChecker. It would be elegant but unfortunately, I have to think they are not general. Cleansing of a str

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-02-28 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked an inline comment as done. gerazo added inline comments. Comment at: lib/StaticAnalyzer/Checkers/DirtyScalarChecker.cpp:184 +Ty = Ctx.IntTy; + if (!Ty->isIntegerType() || Ctx.getIntWidth(Ty) <= TooNarrowForBoundCheck) +return false; a.sidor

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-02-17 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. Hi, did you have time to check my changes? https://reviews.llvm.org/D27753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-22 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked an inline comment as done. gerazo added a comment. So thank you again for the valuable questions. In this checker, I give warnings for values which are both tainted and were also not checked by the programmer. So unlike GenericTaintChecker, I do implement the boundedness check here

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-22 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo marked 6 inline comments as done. gerazo added a comment. Thank you very much for your help. I've added all suggested modifications including tests covering all checker option settings. https://reviews.llvm.org/D27753 ___ cfe-commits mailing

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-22 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo updated this revision to Diff 82336. https://reviews.llvm.org/D27753 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/DirtyScalarChecker.cpp lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp test/Ana

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-14 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo created this revision. gerazo added reviewers: zaks.anna, dcoughlin. gerazo added a subscriber: cfe-commits. Herald added a subscriber: mgorny. Checker for catching tainted value usage without proper bound checking. Uses GenericTaintChecker which is also in alpha.security. https://review