================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to