This is an archive of the discontinued LLVM Phabricator instance.

Canonicalize the path provided by -fmodules-cache-path
ClosedPublic

Authored by aprantl on Mar 13 2017, 3:13 PM.

Details

Summary

This fixes lookup mismatches that could previously happen when the module cache path contained a '/./' component.
In combination with https://reviews.llvm.org/D28299 this bug can cause a use-after-free.

rdar://problem/30413458

Diff Detail

Repository
rL LLVM

Event Timeline

bruno accepted this revision.Mar 13 2017, 3:28 PM

LGTM

lib/Frontend/CompilerInvocation.cpp
1434 ↗(On Diff #91628)

I would suggest using FileManager::makeAbsolutePath, but at this point looks like we haven't set up a FileManager yet.

This revision is now accepted and ready to land.Mar 13 2017, 3:28 PM
This revision was automatically updated to reflect the committed changes.