[PATCH] D11279: Initial patch for PS4 toolchain

Jonathan Roelofs via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 16:51:50 PDT 2015


jroelofs added a subscriber: jroelofs.

================
Comment at: lib/Frontend/InitHeaderSearch.cpp:340
@@ +339,3 @@
+        BaseSDKPath = P.str();
+      }
+    }
----------------
The lifetime of `P` ends here, yet a reference to it lives on because of the `= P.str()`. Using it later on line 344 is UB.


http://reviews.llvm.org/D11279





More information about the cfe-commits mailing list