On Sunday 31 May 2026 00:56:50 LIU Hao wrote:
> 在 2026-5-30 23:58, Pali Rohár 写道:
> > On Saturday 30 May 2026 23:54:24 LIU Hao wrote:
> > > 在 2026-5-30 23:41, Pali Rohár 写道:
> > > > Unwinding phase for non-i386 builds is already skipped via asm 
> > > > .seh_handler
> > > > directive where is specified only @except keyword.
> > > > 
> > > > For i386 builds the skip needs to be explicit in SetThreadName_SEH 
> > > > handler
> > > > itself as i386 build does not use asm .seh_handler directive.
> > > > ---
> > > >    mingw-w64-libraries/winpthreads/src/thread.c | 6 ++++++
> > > >    1 file changed, 6 insertions(+)
> > > 
> > > `@unwind` is only supported on x86-64 which indicates `UNW_FLAG_UHANDLER` 
> > > in
> > > unwinding information. On ARM and ARM64 there's only one type of handler
> > > which is invoked in both cases.
> > 
> > Ok, so if that handler is called on arm also for unwind phase then we
> > should skip EXCEPTION_UNWINDING case also for arm builds.
> 
> This has to be
> 
>    #if !(defined(__x86_64__) && !defined(__arm64ec__))  /* not physical 
> x86-64 */
> 
> ARM64EC is similar to ARM64 as seen in
> 
>    
> https://github.com/lhmouse/arm64ec-playground/actions/runs/26689474508/job/78663245318#step:3

Maybe it is better to check it unconditionally on all archs.
Additional check on amd64 should not cause an issue, it should be always 
negative.
And we do not think if the #ifdef is correct and does not miss something.

Anyway, for completeness we should for all 4 unwind flags, not just the first 
one:
EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND | EXCEPTION_TARGET_UNWIND | 
EXCEPTION_COLLIDED_UNWIND


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

Reply via email to