Page MenuHomePhabricator

futogergely (Fütő Gergely)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 2 2021, 1:14 AM (62 w, 15 h)

Recent Activity

Jun 27 2022

futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..
Jun 27 2022, 9:13 AM · Restricted Project, Restricted Project, Restricted Project
futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..
Jun 27 2022, 7:24 AM · Restricted Project, Restricted Project, Restricted Project
futogergely added a comment to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

Locations for tests and check documentation was changed recently. Please rebase from main and adjust your code accordingly.

Jun 27 2022, 7:23 AM · Restricted Project, Restricted Project, Restricted Project
futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

updates based on comments.

Jun 27 2022, 6:41 AM · Restricted Project, Restricted Project, Restricted Project
futogergely added a comment to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

Just one question if you could try this out for me: what happens if you run clang-tidy a.c b.c (two TUs in the invocation) where one of them (preferably the later one, i.e. b.c) does NOT have Annex K enabled? I believe the cached IsAnnexKAvailable (like any other TU-specific state of the check instance) should be invalidated/cleared in an overridden void onStartTranslationUnit() function.

Also, what happens if the check is run for C++ code?

Jun 27 2022, 6:37 AM · Restricted Project, Restricted Project, Restricted Project

Apr 8 2022

futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..
Apr 8 2022, 12:29 AM · Restricted Project, Restricted Project, Restricted Project

Mar 10 2022

futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

Checker has been moved to bugprone.

Mar 10 2022, 5:57 AM · Restricted Project, Restricted Project, Restricted Project
Herald added a project to D91000: [clang-tidy] Add bugprone-unsafe-functions checker.: Restricted Project.

Now it would be better to have a checker called UnsafeFunctionsCheck (probably in bugprone) and add the cert checkers "msc24-c" and "msc33-c" as aliases. This makes the check extendable if more (CERT rule related or not) cases for unsafe functions are added.

Mar 10 2022, 5:44 AM · Restricted Project, Restricted Project, Restricted Project

Feb 11 2022

futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

I changed the class name: ObsolescentFunctionsCheck->UnsafeFunctionsCheck.
Since MSC33-C is also included, I changed the checker name to cert-msc24-msc33-c.
I added the following functions from CheckSecuritySyntaxOnly under option 'ReportMoreUnsafeFunctions': bcmp, bcopy, bzero, getpw, vfork. Since there is a replacement suggested there, I added the replacement suggestions also.
I did not add tmpnam, tmpfile, mktemp, mkstemp, rand..() to the checker, because there are separate CERT rules for these.

Feb 11 2022, 3:03 AM · Restricted Project, Restricted Project, Restricted Project
futogergely added inline comments to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..
Feb 11 2022, 2:50 AM · Restricted Project, Restricted Project, Restricted Project

Jan 9 2022

futogergely added a comment to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

The functions asctime and asctime_r are discouraged according to CERT MSC33-C rule. These could be added to this check as well. There is a clang SA checker SecuritySyntaxChecker that contains other obsolete functions (and the whole check looks like it can be done in clang-tidy).

Jan 9 2022, 9:56 AM · Restricted Project, Restricted Project, Restricted Project

Jan 4 2022

futogergely added a comment to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

Maybe we could remove the check for setbuf() and rewind() functions, making this a pure Annex K checker. There is an overlapping with another recommendation (https://wiki.sei.cmu.edu/confluence/display/c/ERR07-C.+Prefer+functions+that+support+error+checking+over+equivalent+functions+that+don%27t), these functions are also listed there.

Jan 4 2022, 1:37 AM · Restricted Project, Restricted Project, Restricted Project
futogergely added a comment to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

"It seems like none of these projects actually use the annex K functions, which is not really a surprise.
VLC and lighttpd seems to use it. @futogergely could you please run your check on those projects?"

Jan 4 2022, 1:15 AM · Restricted Project, Restricted Project, Restricted Project
futogergely added a comment to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

"L129 and L135 are uncovered by tests. The rest of the lines are covered by tests, according to lcov."
This happens if STDC_WANT_LIB_EXT1 is defined empty (L129) or STDC_WANT_LIB_EXT1 is not literal (numeric constant, ...).

Jan 4 2022, 12:54 AM · Restricted Project, Restricted Project, Restricted Project

Dec 3 2021

futogergely added a comment to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

Should/does this work in C++ mode for std::whatever?

Dec 3 2021, 4:01 AM · Restricted Project, Restricted Project, Restricted Project
futogergely added inline comments to D91000: [clang-tidy] Add bugprone-unsafe-functions checker..
Dec 3 2021, 3:44 AM · Restricted Project, Restricted Project, Restricted Project
futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..
Dec 3 2021, 3:42 AM · Restricted Project, Restricted Project, Restricted Project

Nov 29 2021

futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..

x64 debian failed

Nov 29 2021, 5:03 AM · Restricted Project, Restricted Project, Restricted Project
futogergely updated the diff for D91000: [clang-tidy] Add bugprone-unsafe-functions checker..
Nov 29 2021, 12:56 AM · Restricted Project, Restricted Project, Restricted Project
futogergely commandeered D91000: [clang-tidy] Add bugprone-unsafe-functions checker..
Nov 29 2021, 12:46 AM · Restricted Project, Restricted Project, Restricted Project

Jun 10 2021

futogergely added a comment to D103595: [clang] Correct MarkFunctionReferenced for local class.

ping

Jun 10 2021, 10:25 PM · Restricted Project

Jun 7 2021

futogergely updated subscribers of D103595: [clang] Correct MarkFunctionReferenced for local class.
Jun 7 2021, 7:24 AM · Restricted Project
futogergely set the repository for D103595: [clang] Correct MarkFunctionReferenced for local class to rG LLVM Github Monorepo.
Jun 7 2021, 7:24 AM · Restricted Project

Jun 3 2021

futogergely updated the diff for D103595: [clang] Correct MarkFunctionReferenced for local class.

clang-format

Jun 3 2021, 3:10 AM · Restricted Project
futogergely updated the diff for D103595: [clang] Correct MarkFunctionReferenced for local class.

formatting in instantiate-local-class.cpp

Jun 3 2021, 1:33 AM · Restricted Project
futogergely requested review of D103595: [clang] Correct MarkFunctionReferenced for local class.
Jun 3 2021, 1:24 AM · Restricted Project