[llvm] [LLVM][Cygwin] Fix Signals compatibility with Cygwin API (PR #138117)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu May 1 13:51:30 PDT 2025


mstorsjo wrote:

> Unrelated to this PR, but they really should be checking the return value of dladdr a few lines above and not trying to use the DL_info struct in case of error. In Cygwin at least, it likely won't have written to dli_fname in that case. I'm not firm enough in the specs involved in this situation: in C I'd think you'd need to set the struct `= {0}` to make sure it's zeroed, but in C++ perhaps it and its members are default constructed and so zero rather than uninitialized?

That sounds like a quite reasonable fix. And I do think you would need to manually initialize a struct even in C++ if you want it to be zero initialized.

https://github.com/llvm/llvm-project/pull/138117


More information about the llvm-commits mailing list