================ @@ -2187,7 +2187,10 @@ std::optional<SVal> RegionStoreManager::getBindingForDerivedDefaultValue( // Lazy bindings are usually handled through getExistingLazyBinding(). // We should unify these two code paths at some point. - if (isa<nonloc::LazyCompoundVal, nonloc::CompoundVal>(val)) + // 'nonloc::ConcreteInt' values can arise from compound literals in + // designated initializers for bitfields in unions. + if (isa<nonloc::LazyCompoundVal, nonloc::CompoundVal, nonloc::ConcreteInt>( + val)) ---------------- steakhal wrote:
Could you help me with a Store for which the crash happened without the fix? It would help me understand why do we have there a ConcreteInt, because I fear, if a ConcreteInt can get here, it's likely that other NonLocs can also reach this. Anyways, LCVs and CompoundVals form one set of exception, and the ConcreteInt case is definitely something else thus shouldn't be handled by the same if but rather split into a separate `if` IMO. https://github.com/llvm/llvm-project/pull/146418 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits