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
Paths
| Differential D30915
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. rdar://problem/30413458
Diff Detail Event Timelineaprantl added a parent revision: D28299: Module: use PCMCache to manage memory buffers for pcm files.. aprantl removed a parent revision: D28299: Module: use PCMCache to manage memory buffers for pcm files.. aprantl added a child revision: D28299: Module: use PCMCache to manage memory buffers for pcm files..Mar 13 2017, 3:15 PM Comment Actions LGTM
This revision is now accepted and ready to land.Mar 13 2017, 3:28 PM Closed by commit rL297790: Canonicalize the path provided by -fmodules-cache-path. (authored by adrian). · Explain WhyMar 14 2017, 4:20 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 91628 lib/Frontend/CompilerInvocation.cpp
test/Modules/Inputs/outofdate-rebuild/AppKit.h
test/Modules/Inputs/outofdate-rebuild/Cocoa.h
test/Modules/Inputs/outofdate-rebuild/CoreVideo.h
test/Modules/Inputs/outofdate-rebuild/Foundation.h
test/Modules/Inputs/outofdate-rebuild/module.modulemap
test/Modules/modules-cache-path-canonicalization.m
|
I would suggest using FileManager::makeAbsolutePath, but at this point looks like we haven't set up a FileManager yet.