[clang] [llvm] [TargetParser][ARM][NFC] Make string tables reloc-free (PR #206937)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 06:13:22 PDT 2026
================
@@ -927,7 +927,8 @@ void tools::getTargetFeatures(const Driver &D, const llvm::Triple &Triple,
for (auto Feature : unifyTargetFeatures(Features)) {
CmdArgs.push_back(IsAux ? "-aux-target-feature" : "-target-feature");
- CmdArgs.push_back(Feature.data());
+ // Feature strings may not be null-terminated.
----------------
aengelke wrote:
Yes, it is a user error to assume that a StringRef is null-terminated, which quite often is not the case..
https://github.com/llvm/llvm-project/pull/206937
More information about the llvm-commits
mailing list