Skip to content

5.36 fails tests | op.sort #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shawnlaffan opened this issue Mar 16, 2023 · 4 comments
Closed

5.36 fails tests | op.sort #85

shawnlaffan opened this issue Mar 16, 2023 · 4 comments
Labels

Comments

@shawnlaffan
Copy link
Contributor

I think I looked into this before and from memory it is UTF related, so might be related to #60

Will look into it later unless someone beats me to it.

op/sort.t ............................................................
Dubious, test returned 40 (wstat 10240, 0x2800)
Failed 49/203 subtests
@xenu
Copy link

xenu commented Mar 16, 2023

ok 154 - sort sub refcnt
gdb: unknown target exception 0xc0000028 at 0x7ffa1a0d2856

Thread 1 received signal ?, Unknown signal.
0x00007ffa1a0d2856 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
(gdb) bt
#0  0x00007ffa1a0d2856 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ffa1a000bb3 in ntdll!RtlUnwindEx () from C:\Windows\SYSTEM32\ntdll.dll
#2  0x00007ffa18f92eed in msvcrt!_setjmpex () from C:\Windows\System32\msvcrt.dll
#3  0x00007ff9a02e154f in perl536!Perl_qerror ()
   from C:\Users\xenu\Downloads\sp536_20230316\strawberry\perl\bin\perl536.dll
#4  0x00007ff9a038094c in perl536!Perl_vcroak ()
   from C:\Users\xenu\Downloads\sp536_20230316\strawberry\perl\bin\perl536.dll
#5  0x00007ff9a0380a27 in perl536!Perl_croak_nocontext ()
   from C:\Users\xenu\Downloads\sp536_20230316\strawberry\perl\bin\perl536.dll
#6  0x00007ff9a03810f7 in perl536!Perl_croak_no_modify ()
   from C:\Users\xenu\Downloads\sp536_20230316\strawberry\perl\bin\perl536.dll
#7  0x00007ff9a0374ea5 in perl536!Perl_sortsv ()
   from C:\Users\xenu\Downloads\sp536_20230316\strawberry\perl\bin\perl536.dll
#8  0x0000000000000001 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

@xenu
Copy link

xenu commented Mar 16, 2023

This is an instance of Perl/perl5#17521. Basically, setjmp/longjmp in MinGW is buggy and completely innocent code changes can cause it to segfault. We triggered this bug in many different ways over the years.

This particular failure was probably triggered by HAS_BUILTIN_EXPECT. We disabled it upstream for that reason (see: Perl/perl5@abd494f). It's also the reason why our GNUMakefile uses -Os instead of -O2 (very ugly workaround!).

I don't know, but it's possible that upgrading the compiler will also make it go away.

BTW, Perl isn't the only project that suffers from this issue. Nimbus devs came up with an interesting workaround, they redefine setjmp so it's no longer SEH-aware. That needs to be investigated.

@shawnlaffan
Copy link
Contributor Author

Thanks @xenu

I'll try a build with HAS_BUILTIN_EXPECT disabled and patching in Perl/perl5#20136

@shawnlaffan
Copy link
Contributor Author

That looks to do the trick. op/sort.t passes with those settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants