================
@@ -27,7 +27,7 @@ bool InterpState::inConstantContext() const {
 }
 
 InterpState::~InterpState() {
-  while (Current) {
+  while (Current && !Current->isBottomFrame()) {
----------------
slackito wrote:

This is causing use-after-destruction errors for me when running clang tests 
under MemorySanitizer.

If I understand correctly, after the body of `~EvalEmitter()` finishes running, 
its members are destroyed in reverse order of declaration, and `BottomFrame` 
gets destroyed before the destructor for `InterpState S;` runs.


https://github.com/llvm/llvm-project/pull/125253
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to