[clang] [llvm] [llvm][clang] Sandbox filesystem reads (PR #165350)

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 7 14:55:33 PST 2025


================
@@ -111,10 +118,16 @@ class CrossProcessModuleCache : public ModuleCache {
 
   std::unique_ptr<llvm::AdvisoryLock>
   getLock(StringRef ModuleFilename) override {
+    // This is a compiler-internal input/output, let's bypass the sandbox.
+    auto BypassSandbox = llvm::sys::sandbox::scopedDisable();
----------------
jansvoboda11 wrote:

I decided to disable the sandbox for all `CrossProcessModuleCache` functions just for consistency. This particular disablement isn't necessary and wasn't motivated by `LockFileManager` itself at all. I'm happy to remove this particular disablement if you find that clearer. Good question though!

https://github.com/llvm/llvm-project/pull/165350


More information about the cfe-commits mailing list