[all-commits] [llvm/llvm-project] 438fc2: [analyzer] Fix crash in GenericTaintChecker when p...
tomasz-kaminski-sonarsource via All-commits
all-commits at lists.llvm.org
Mon Jul 24 01:57:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 438fc2c83b73e66f6dbae4f34e9a19f41302f825
https://github.com/llvm/llvm-project/commit/438fc2c83b73e66f6dbae4f34e9a19f41302f825
Author: Tomasz KamiĆski <tomasz.kaminski at sonarsource.com>
Date: 2023-07-24 (Mon, 24 Jul 2023)
Changed paths:
M clang/lib/StaticAnalyzer/Core/SVals.cpp
M clang/test/Analysis/taint-generic.c
Log Message:
-----------
[analyzer] Fix crash in GenericTaintChecker when propagatig taint to AllocaRegion
The `GenericTaintChecker` checker was crashing, when the taint
was propagated to `AllocaRegion` region in following code:
```
int x;
void* p = alloca(10);
mempcy(p, &x, sizeof(x));
```
This crash was caused by the fact that determining type of
`AllocaRegion` returns a null `QualType`.
This patch makes `AllocaRegion` expose its type as `void`,
making them consistent with results of `malloc` or `new`
that produce `SymRegion` with `void*` symbol.
Reviewed By: steakhal, xazax.hun
Differential Revision: https://reviews.llvm.org/D155847
More information about the All-commits
mailing list