[PATCH] D69313: Handle more crt*.o filename variants.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 11:32:20 PDT 2019


ruiu added inline comments.


================
Comment at: lld/ELF/OutputSections.cpp:397
+  static std::regex re(R"((clang_rt\.)?crtbegin[ST]?(\-.*)?\.o)");
+  return std::regex_match(s.data(), re);
 }
----------------
A char array returned by StringRef::data() is not guaranteed to be null-terminated, so I don't think this line is safe.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69313/new/

https://reviews.llvm.org/D69313





More information about the llvm-commits mailing list