Potential UB in diagnostics for LTO mode.
Open
confirmed
- Dominant language
- LLVM
- Stars
- 1.5k
- Forks
- 854
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 137
Description
https://github.com/intel/llvm/blob/2705b67a216fda7b32648a2f42d3c2d69d4b6fe3/clang/lib/Driver/ToolChains/Clang.cpp#L6000-L6023
The pattern used in this code doesn't the pointer returned by `Args.getLastArg(options::OPT_foffload_lto, options::OPT_foffload_lto_EQ)` before dereferencing. This can be source of UB.
Contributor guide
Assessment
This issue has not been assessed yet.