[all-commits] [llvm/llvm-project] 56fa01: [analyzer] Fix crash on using `bitcast(<type>, <ar...
Pavel Skripkin via All-commits
all-commits at lists.llvm.org
Sun Aug 4 02:27:06 PDT 2024
Branch: refs/heads/release/19.x
Home: https://github.com/llvm/llvm-project
Commit: 56fa0195ed952dfa53f36890759f4b0ac3556e01
https://github.com/llvm/llvm-project/commit/56fa0195ed952dfa53f36890759f4b0ac3556e01
Author: Pavel Skripkin <paskripkin at gmail.com>
Date: 2024-08-04 (Sun, 04 Aug 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/StaticAnalyzer/Core/Store.cpp
M clang/test/Analysis/exercise-ps.c
Log Message:
-----------
[analyzer] Fix crash on using `bitcast(<type>, <array>)` as array subscript (#101647)
Current CSA logic does not expect `LazyCompoundValKind` as array index.
This may happen if array is used as subscript to another, in case of
bitcast to integer type.
Catch such cases and return `UnknownVal`, since CSA cannot model
array -> int casts.
Closes #94496
(cherry picked from commit d96569ecc2807a13dab6495d8cc4e82775b00af1)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list