get wrong path when pathname is softlink directory
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
https://github.com/llvm/llvm-project/blob/fbd24677963abedf88b6dbed277764e955374dd8/lldb/source/Utility/FileSpec.cpp#L185
when we use a path which contains softlink directory and also a relative path, such as `/usr/local/compile/interface/../api/A.h`
it contains softlink direcoty `/usr/local/compile/interface` which link to `/root/compile/`
The code will remove dot, so file path will become `/usr/local/compile//api/A.h` which does not exist.
But the path we need is `/root/api/A.h`
Contributor guide
Research direction
Start by reading the referenced logic in lldb/source/Utility/FileSpec.cpp around line 185 and trace how relative components are handled when a directory is a symlink. Done means a path like /usr/local/compile/interface/../api/A.h resolves to the intended target rather than the nonexistent lexical path, with regression coverage added in the relevant LLDB tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100