[all-commits] [llvm/llvm-project] 909c96: [analyzer] Fix stdin declaration in C++ tests (#66...

Balazs Benics via All-commits all-commits at lists.llvm.org
Thu Sep 14 02:55:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 909c9639994b5467e8c8424580063e29139d1def
      https://github.com/llvm/llvm-project/commit/909c9639994b5467e8c8424580063e29139d1def
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2023-09-14 (Thu, 14 Sep 2023)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
    M clang/test/Analysis/taint-diagnostic-visitor.c
    M clang/test/Analysis/taint-generic.cpp

  Log Message:
  -----------
  [analyzer] Fix stdin declaration in C++ tests (#66074)

The `stdin` declaration should be within `extern "C" {...}`, in C++
mode. In addition, it should be also marked `extern` in both C and
C++ modes.

I tightened the check to ensure we only accept `stdin` if both of these
match. However, from the Juliet test suite's perspective, this commit
should not matter.

https://github.com/llvm/llvm-project/pull/66074


  Commit: 8243bc40452bc90fa4f66a374d088907c1fe38cb
      https://github.com/llvm/llvm-project/commit/8243bc40452bc90fa4f66a374d088907c1fe38cb
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2023-09-14 (Thu, 14 Sep 2023)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
    M clang/test/Analysis/taint-generic.c

  Log Message:
  -----------
  [analyzer] Make socket `accept()` propagate taint (#66074)

This allows to track taint on real code from `socket()`
to reading into a buffer using `recv()`.

https://github.com/llvm/llvm-project/pull/66074


  Commit: 61924da630532c91f00351b7e84548eb42e2e1e0
      https://github.com/llvm/llvm-project/commit/61924da630532c91f00351b7e84548eb42e2e1e0
  Author: Balazs Benics <benicsbalazs at gmail.com>
  Date:   2023-09-14 (Thu, 14 Sep 2023)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
    M clang/test/Analysis/taint-generic.c

  Log Message:
  -----------
  [analyzer] Propagate taint for wchar variants of some APIs (#66074)

Functions like `fgets`, `strlen`, `strcat` propagate taint.
However, their `wchar_t` variants don't. This patch fixes that.

Notice, that there could be many more APIs missing.
This patch intends to fix those that so far surfaced,
instead of exhaustively fixing this issue.

https://github.com/llvm/llvm-project/pull/66074


Compare: https://github.com/llvm/llvm-project/compare/0b2778d5e591...61924da63053


More information about the All-commits mailing list