Re: [PATCH v2 0/1] MR9762: msvcrt: Rename __C_specific_handler to avoid a clang20 crash
On Fri Dec 12 23:16:16 2025 +0000, Martin Storsjö wrote:
That sounds odd, that it would crash specifically dependent on the function name. Is the crash specifically only with Clang == 20, or for newer/older versions too? Can you give more details about the build configuration - building `except.c` as COFF, for x86_64? With the compiler invoked in MSVC mode (which is the default in Wine today) or mingw mode? with creduce I was able to get this to crash:
``` #define a(b, c) __except (b()) long d() { __try { } a(d, ) {} } void __C_specific_handler() {} ``` the define is __EXCEPT_CTX it crashes for me on x86_64 and on ARM64: `"/mnt/nvme/llvm-mingw-20250305-ucrt-ubuntu-20.04-aarch64/bin/clang-20" "-cc1" "-triple" "arm64ec-unknown-windows-msvc19.33.0" "-emit-obj" "-mincremental-linker-compatible" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "except.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=none" "-relaxed-aliasing" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-ffp-exception-behavior=maytrap" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "generic" "-target-feature" "+v8a" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-abi" "aapcs" "-debug-info-kind=constructor" "-dwarf-version=4" "-ffunction-sections" "-D" "__STDC__" "-D" "_MSVCR_VER=0" "-D" "__WINESRC__" "-D" "_CRTDLL" "-D" "_CRTIMP=" "-D" "__WINE_PE_BUILD" "-O2" "-Wall" "-Wdeclaration-after-statement" "-Wempty-body" "-Wignored-qualifiers" "-Winit-self" "-Wno-microsoft-enum-forward-reference" "-Wstrict-prototypes" "-Wtype-limits" "-Wunused-but-set-parameter" "-Wvla" "-Wwrite-strings" "-Wpointer-arith" "-Wabsolute-value" "-fconst-strings" "-ferror-limit" "19" "-fno-builtin" "-fno-use-cxa-atexit" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.33" "-fskip-odr-check-in-gmf" "-fdelayed-template-parsing" "-fasync-exceptions" "-fexceptions" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-target-feature" "-fmv" "-faddrsig" "-x" "c" "except-3d067c.c" ` clang21 works fine the native ubuntu clang20 also crashes, so it's not related to llvm-mingw -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9762#note_125553
participants (1)
-
André Zwing (@AndreRH)