================
@@ -597,7 +597,8 @@ class Sema;
   public:
     void init(FailureKind K, Expr *From, QualType To) {
       init(K, From->getType(), To);
-      FromExpr = From;
+      if (!isa<OpaqueValueExpr>(From))
+        FromExpr = From;
----------------
zyn0217 wrote:

> So the idea is that if this is an OVE we won't track them after the init has 
> occurred, so the UaF problem is mitigated?

Yes, in the function above it sets FromExpr to null and all the clients would 
check that. We wouldn't have UAF nor leaking with this.

https://github.com/llvm/llvm-project/pull/238243
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to