[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-04-05 Thread via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-04-05 Thread via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/86536 >From fdde1056e8a34ad642f50eef120dbc8ee08f8825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 18 Mar 2024 14:47:57 +0100 Subject: [PATCH 1/2] [analyzer] Make recognition of hardened

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-04-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. Sorry for the delay. Nothing jumps out to me, feel free to merge it. https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM, but I'd recommed @Xazax-hun to also have a look. If nothing happens, merge this after one week. https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread via cfe-commits
NagyDonat wrote: [Replying to the following inline comment of @steakhal :] > You had a comment about __builtin___vsprintf_chk. ``` // This is using `equals()` instead of more lenient prefix/suffix/substring // checks because we don't want to say that e.g. `__builtin___vsprintf_chk()` // is

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/86536 >From fdde1056e8a34ad642f50eef120dbc8ee08f8825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 18 Mar 2024 14:47:57 +0100 Subject: [PATCH 1/2] [analyzer] Make recognition of hardened

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread via cfe-commits
@@ -124,34 +124,45 @@ class CStringChecker : public Checker< eval::Call, const CallEvent &)>; CallDescriptionMap Callbacks = { - {{CDM::CLibrary, {"memcpy"}, 3}, + {{CDM::CLibraryMaybeHardened, {"memcpy"}, 3},

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
@@ -124,34 +124,45 @@ class CStringChecker : public Checker< eval::Call, const CallEvent &)>; CallDescriptionMap Callbacks = { - {{CDM::CLibrary, {"memcpy"}, 3}, + {{CDM::CLibraryMaybeHardened, {"memcpy"}, 3},

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I like your patch. This is an important fix. I only had a couple nits, but overall looks good. https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
@@ -110,13 +110,24 @@ bool CheckerContext::isCLibraryFunction(const FunctionDecl *FD, if (FName.starts_with("__inline") && FName.contains(Name)) return true; - if (FName.starts_with("__") && FName.ends_with("_chk") && - FName.contains(Name)) -return true; -

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-27 Thread Balazs Benics via cfe-commits
@@ -124,34 +124,45 @@ class CStringChecker : public Checker< eval::Call, const CallEvent &)>; CallDescriptionMap Callbacks = { - {{CDM::CLibrary, {"memcpy"}, 3}, + {{CDM::CLibraryMaybeHardened, {"memcpy"}, 3},

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-25 Thread via cfe-commits
NagyDonat wrote: Note that the build of "ClangReplInterpreterTests" (whatever that may be) fails on this commit, but it's very likely that this issue is coming from the current state of the "main" branch. https://github.com/llvm/llvm-project/pull/86536

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-25 Thread via cfe-commits
github-actions[bot] wrote: :white_check_mark: With the latest revision this PR passed the Python code formatter. https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-25 Thread via cfe-commits
github-actions[bot] wrote: :white_check_mark: With the latest revision this PR passed the C/C++ code formatter. https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (NagyDonat) Changes In builds that use source hardening (-D_FORTIFY_SOURCE), many standard functions are implemented as macros that expand to calls of hardened functions that take one additional argument compared to the "usual"

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-03-25 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/86536 In builds that use source hardening (-D_FORTIFY_SOURCE), many standard functions are implemented as macros that expand to calls of hardened functions that take one additional argument compared to the "usual"