Skip to content

clang-tidy 20 crashes in RegionStoreManager #147686

Open
@BobIsOnFire

Description

@BobIsOnFire

The best I could minimize is this, repro crashes on line 7 (*m_ptr = '\0'):

class A
{
public:
    A()
    : m_ptr(m_buf)
    {
        *m_ptr = '\0';
    }

private:
    char m_buf[64] = {0};
    char * m_ptr;
};

A a;

crash.log

Reproduces in godbolt as well (with trunk clang-tidy): https://godbolt.org/z/PMaToWrWG

Using 20.1.7 compiled with assertions, I get following assertion error with the same stack:

clang-tidy: /export/home/nikita.akatiev/llvm-project/llvm/include/llvm/Support/Casting.h:566: decltype(auto) llvm::cast(const From&) [with To = clang::ento::nonloc::CompoundVal; From = clang::ento::SVal]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

I've also ran a git-bisect, which led me to this commit 820403c.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions