Open AndrewScheidecker opened 8 months ago
@llvm/issue-subscribers-clang-static-analyzer
Author: Andrew Scheidecker (AndrewScheidecker)
Thanks for the report. I start to hate reinterpret-casts (including bitcasts). They trigger all sorts of assertions all over the place in CSA. If only we did just model the casts as they appear.
Ah, I'll look into working around this case. Thanks again.
While working with a build of clang that has assertions enabled, I found a simple repro for an assertion failure with tip of tree clang: https://github.com/llvm/llvm-project/blob/d49a893cdbea0dd6f8fde7dc9f321b2e0d169bba/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp#L1159
Repro command-line:
Contents of
repro.cpp
:While this repro is very similar to #69922, the proposed fix for that bug (#70837) doesn't fix this bug.
Here's the full output of the crash trace: