-
Notifications
You must be signed in to change notification settings - Fork 577
VS2022 Test ext/XS-APItest/t/clone-with-stack.t randomly causes "perl.exe has stopped working" in perl 5.39.7 #21969
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
Comments
We have not received any other recent reports of test failures in Did you experience these failures with earlier perl releases, e.g., perl-5.39.6 or perl-5.38.1? I see from this statement from Microsoft that Windows 8.1 was EOLed on January 10, 2023. My feeling is that we should not be concerned about random test failures on obsolete Windows systems unless we can reproduce them on versions that MS is supporting. |
No. So I just tried the same thing with Perl 5.39.6 and it reproduces. |
I can't reproduce the issue on Windows 11 ( Does running
And I'm wondering if the crash is associated with that failing test ? |
To me, it appears to occur at the test 3 of The results of the above are as follows.
Edit: The STATUS value changed as follows, but crashes randomly.
Thank you, |
Could @iabyn take a look at this. Finding a fix for these sorts of things is a bit beyond me. @twata, I suppose that one thing you could do is to remove that failing test, and see if that prevents the crash:
|
@sisyphus
Thank you, |
That test launches a separate interpreter which crashes. Since the test is marked as TODO, it doesn't cause a failure. It's a TODO test because pseudofork inside BEGIN blocks is documented as broken. That being said, it probably shouldn't crash. Here's what ASAN says about the crash:
|
On Sun, Feb 11, 2024 at 10:34:44AM -0800, Tomasz Konojacki wrote:
Here's what ASAN says about the crash:
I'm currently working on this,
…--
Spock (or Data) is fired from his high-ranking position for not being able
to understand the most basic nuances of about one in three sentences that
anyone says to him.
-- Things That Never Happen in "Star Trek" #19
|
a fresh_perl() TODO test in this file does something like use XS::APItest; BEGIN { clone_with_stack(); } print "ok\n"; As a standalone program, this code gives errors under valgrind, and in ticket GH #21969 was causing "perl.exe has stopped working" on Windows 8. The clone_with_stack() XS function is fairly dodgy - it clones the whole interpreter including stacks (i.e. what fork() emulation on windows does), but then continues the RUNOPS loop to completion itself, using the cloned interpreter, rather than relying on the caller to finish the ops loop. This doesn't work very well under BEGIN (hence why it's a TODO test), but specifically, PL_curcop can be left pointing at an op which gets freed , but then is later accessed anyway. This commit resets PL_curcop to &PL_compiling to avoid crashes.
On Mon, Feb 12, 2024 at 02:21:28AM -0800, iabyn wrote:
I'm currently working on this,
And it may be fixed with #21979
…--
Music lesson: a symbiotic relationship whereby a pupil's embellishments
concerning the amount of practice performed since the last lesson are
rewarded with embellishments from the teacher concerning the pupil's
progress over the corresponding period.
|
@iabyn
Thank you all! |
a fresh_perl() TODO test in this file does something like use XS::APItest; BEGIN { clone_with_stack(); } print "ok\n"; As a standalone program, this code gives errors under valgrind, and in ticket GH #21969 was causing "perl.exe has stopped working" on Windows 8. The clone_with_stack() XS function is fairly dodgy - it clones the whole interpreter including stacks (i.e. what fork() emulation on windows does), but then continues the RUNOPS loop to completion itself, using the cloned interpreter, rather than relying on the caller to finish the ops loop. This doesn't work very well under BEGIN (hence why it's a TODO test), but specifically, PL_curcop can be left pointing at an op which gets freed , but then is later accessed anyway. This commit resets PL_curcop to &PL_compiling to avoid crashes.
Description
I'm building Perl 5.39.7 on Windows 8.1 64 bit using Visual Studio 2022 Community Edition (Microsoft(R) C/C++ Optimizing Compiler Version 19.33.31630 for x64).
The compilation itself is successful, although several types of warnings are outputed (e.g.
C4244
,C4267
, etc.).The tests themselves are successful when running
nmake test
. However, It seems to me thatext/XS-APItest/t/clone-with-stack.t
randomly causes "perl.exe has stopped working" (See the following image.).Steps to Reproduce
Download perl-5.39.7.tar.gz from metacpan (https://metacpan.org/release/CORION/perl-5.39.7).
Extract from perl-5.39.7.tar.gz to C:\VCPerl64.
Open C:\VCPerl64\perl-5.39.7\win32\Makefile in your editor and edit as follows.
Launch "x64 Native Tools Command Prompt for VS 2022" from the Start menu.
On that Command Prompt, run the following.
After
nmake
is finished ,cd ..\ext\XS-APItest
and run the following about 3 or 4 times.Expected behavior
do not cause "perl.exe has stopped working"
Perl configuration
The text was updated successfully, but these errors were encountered: