On Fri, 26 Dec 2025, LIU Hao wrote:

在 2025-12-26 11:31, LIU Hao 写道:
在 2025-12-26 07:08, Pali Rohár 写道:
WinSDK header files also defines EXCEPTION_DISPOSITION as enum.
---
  mingw-w64-headers/crt/excpt.h | 13 ++++++-------
  1 file changed, 6 insertions(+), 7 deletions(-)


Somewhere in libunwind, an integer is returned (maybe it should be fixed in libubwind), so this breaks libunwind somehow:


https://github.com/llvm/llvm-project/blob/7dcd69880102cda2fe1a43f3356abb0ec41f2dc4/libunwind/src/Unwind- seh.cpp#L166

Looks like it's not an actual return to Windows, but a magic value for internal use in libunwind:

https://github.com/llvm/llvm-project/blob/7dcd69880102cda2fe1a43f3356abb0ec41f2dc4/libunwind/src/Unwind-seh.cpp#L272

Also, FWIW, there is test coverage for these branches, in the libunwind CI tests.

I did an one-off test with this, removing the special value handling: https://github.com/mstorsjo/llvm-project/commit/5045bfdef75e2be9fe465776ae6b8e880a4fc53a

With this change, some tests started failing in CI: https://github.com/mstorsjo/llvm-project/actions/runs/21033791422

In particular, this makes the following test cases fail:

  Failed Tests (3):
    llvm-libc++abi-mingw.cfg.in :: forced_unwind1.pass.cpp
    llvm-libc++abi-mingw.cfg.in :: forced_unwind2.pass.cpp
    llvm-libc++abi-mingw.cfg.in :: forced_unwind3.pass.cpp

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to