PDLPorters/pdl

PDL::all segfaults under Strawberry perl 5.36 current dev version

shawnlaffan opened this issue · 5 comments

More details in StrawberryPerl/Perl-Dist-Strawberry#93
Link to the perl used is https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/tag/dev_20230420

The segfault manifests in the niceslice tests but can be reduced to the all call. I have not tested other utilities.

The issue spans 2.079 to 2.082.

gdb perl
(gdb) set args -Mblib -MPDL -E"my $p = pdl [6,6]; say all $p == 6;"
(gdb) run
Starting program: C:\strawberry\perl\bin\perl.exe -Mblib -MPDL -E"my $p = pdl [6,6]; say all $p == 6;"
[New Thread 25772.0x8778]
[New Thread 25772.0x7d98]
[New Thread 25772.0x65f0]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff8c880927b in boot_PDL__Core ()
   from C:\STRAWB~2\data\.cpanm\work\1681992025.28280\PDL-2.082\blib\arch\auto\PDL\Core\Core.xs.dll

As noted on StrawberryPerl/Perl-Dist-Strawberry#93, I need more information than this, especially a stack-trace and line-number.

And if it's being reported as caused in the boot, are you sure it's even caused by all?

Will rebuild freeglut PDL and report back.

As for all, that is just where it first manifests in the tests. I would not be surprised that other subs are similarly affected.

There is a workaround @mohawk2 and I discussed in IRC:
Compiling one single file Basic/Core/pdlapi.c without optimization gets rid of the SIGSEGV. Of this SIGSEGV, to be precise ;-)

Since this isn't a PDL bug per se, can we keep discussion on StrawberryPerl/Perl-Dist-Strawberry#93 ? Also, @shawnlaffan if you agree, you could close this?

I'll close this so discussion is in one place. We can always re-open if the best option turns out to be patching one file in PDL (and that might be a very large "if").