================ @@ -952,6 +952,12 @@ SVal SimpleSValBuilder::evalBinOpLL(ProgramStateRef state, const MemSpaceRegion *RightMS = RightBase->getMemorySpace(); const MemSpaceRegion *UnknownMS = MemMgr.getUnknownRegion(); + if (LeftMS != RightMS && + ((isa<UnknownSpaceRegion>(LeftMS) && isa<StackSpaceRegion>(RightMS)) || + (isa<StackSpaceRegion>(LeftMS) && isa<UnknownSpaceRegion>(RightMS)))) { + return UnknownVal(); + } + ---------------- steakhal wrote:
In the current form, it's likely that the subsequent check could be simplified, that checks something really similar like this one. Please consider hoisting common subexpressions, and simplifying the subsequent check as well. https://github.com/llvm/llvm-project/pull/122404 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits