[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)
Mateusz MikuĊa via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 5 15:58:12 PDT 2025
================
@@ -847,7 +847,11 @@ void llvm::sys::PrintStackTrace(raw_ostream &OS, int Depth) {
const char *name = strrchr(dlinfo.dli_fname, '/');
if (!name)
+#ifdef __CYGWIN__
+ OS << format(" %-*s", width, &dlinfo.dli_fname);
----------------
mati865 wrote:
Good point, somehow my brain switched to Rust mode when working on this problem.
Can we even trust Cygwin's `dli_fname` to always be null terminated? Maybe the best solution would be to create std::string and then just call `.c_str()`?
https://github.com/llvm/llvm-project/pull/134494
More information about the llvm-commits
mailing list