On Tuesday 08 September 2026 10:42:09 Pali Rohár wrote:
> On Tuesday 08 September 2026 13:45:01 LIU Hao wrote:
> > 在 2026-9-7 07:40, Pali Rohár 写道:
> > > Anyway, here is simple fixup change disables that test for gcc builds:
> > > 
> > > diff --git a/mingw-w64-crt/testcases/t_noatexit_dll.c 
> > > b/mingw-w64-crt/testcases/t_noatexit_dll.c
> > > index 4f8a86328933..e62ad5b1dcd5 100644
> > > --- a/mingw-w64-crt/testcases/t_noatexit_dll.c
> > > +++ b/mingw-w64-crt/testcases/t_noatexit_dll.c
> > > @@ -13,6 +13,13 @@ int main(void)
> > >   {
> > >     mingw_test_init();
> > > 
> > > +  /* gcc's crtbegin.o (libgcc/config/i386/cygming-crtbegin.c) injects 
> > > atexit call into every output binary.
> > > +   * So skip this test for all gcc builds (and exclude clang builds for 
> > > which this test is passing). */
> > > +#if defined(__GNUC__) && !defined(__clang__)
> > > +  printf("test skipped for gcc builds\n");
> > > +  return 77;
> > > +#endif
> > > +
> > >     HMODULE lib = LoadLibraryA("libnoatexit.dll");
> > >     if (!lib) {
> > >       DWORD error = GetLastError();
> > 
> > This change looks fine and passes the CI (at least for now), so I have
> > pushed these patches with the change squashed into the test.
> > 
> > I am not sure whether the issue is specific to `DWARF2_UNWIND_INFO`; I tried
> > `#if defined(__GNUC__) && !defined(__clang__) && !defined(__SEH__)` but it
> > didn't pass: 
> > https://github.com/lhmouse/mingw-w64/actions/runs/34134697664/job/101837213788#step:6:3668
> 
> The atexit callback function contains only #if DWARF2_UNWIND_INFO code.
> But the atexit call is injected for the #if DEFAULT_USE_CXA_ATEXIT case,
> it is injected also for non-DWARF code. So simple switching from DWARF
> to SEH is not sufficient, and so the test is expected to fail.

I have reported this issue to gcc bug tracker:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127366


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

Reply via email to