Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.91k stars 542 forks source link

"Unknown software exception" (crash) when using sigtrap in ActiveState Perl 5.6.1 build 631 #5432

Closed p5pRT closed 21 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#9230 (status was 'resolved')

Searchable as RT9230$

p5pRT commented 22 years ago

From John.Cullen@portoeditora.pt

The following code snippet causes perl to die with an "unknown software exception (0xc0000029)" when trying to use sigtrap to catch "ctrl-C" at a DOS prompt.

#!perl use sigtrap 'handler'\, \&my_handler\, 'normal-signals';

while (\<>) {   # minimal code to provoke bug! }

sub my_handler {   local($sig = shift @​_);   print STDERR "Exiting after catching signal SIG$sig\n";   exit(0); }

Perl Info ``` Flags: category=core severity=medium Site configuration information for perl v5.6.1: Configured by John Cullen at Wed Jan 2 17:16:07 2002. Summary of my perl5 (revision 5 version 6 subversion 1) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultiplicity=define useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX', optimize='-O1 -MD -DNDEBUG', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"C:\Perl\lib\CORE" -machine:x86' libpth="C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib" "C:\Perl\lib\CORE" libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -libpath:"C:\Perl\lib\CORE" -machine:x86' Locally applied patches: ACTIVEPERL_LOCAL_PATCHES_ENTRY @INC for perl v5.6.1: C:/Perl/lib C:/Perl/site/lib . Environment for perl v5.6.1: HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=C:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM;C:\Perl\bin\;C:\Program Files\Microsoft Platform SDK\Bin\.;C:\Program Files\Microsoft Platform SDK\Bin\WinNT\.;C:\Program Files\Rational\common;C:\PROGRA~1\ULTRAEDT;C:\PROGRA~1\ULTRAE~1;C:\Program Files\doxygen\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;F:\TrabNT_JC\Projectos\BatchFiles PERL5OPT=-MWild PERL_BADLANG (unset) SHELL (unset) John Cullen Programador - Divisão de Sistemas e Desenvolvimento _______________________________________________________________ Porto Editora Rua da Restauração, 365 * 4099-023 * PORTO - PORTUGAL Tel.: +351 22 6088326 * Fax: +351 22 6088331 john.cullen@portoeditora.pt Grupo Porto Editora - 1944-2002, 2 de Maio 58 anos com o Futuro da Educação ```
p5pRT commented 22 years ago

From @tux

On Wed 08 May 2002 15​:53\, John.Cullen@​portoeditora.pt wrote​:

The following code snippet causes perl to die with an "unknown software exception (0xc0000029)" when trying to use sigtrap to catch "ctrl-C" at a DOS prompt.

#!perl use sigtrap 'handler'\, \&my_handler\, 'normal-signals';

while (\<>) { # minimal code to provoke bug! }

sub my_handler { local($sig = shift @​_); print STDERR "Exiting after catching signal SIG$sig\n"; exit(0); }

Not with blead/cygwin/win2k

PC09​:/Tmp 504 $ perl -v

This is perl\, v5.7.3 built for cygwin-64int (with 1 registered patch\, see perl -V for more detail)

Copyright 1987-2002\, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License\, which may be found in the Perl 5 source kit.

Complete documentation for Perl\, including FAQ lists\, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet\, point your browser at http​://www.perl.com/\, the Perl Home Page.

PC09​:/Tmp 505 $ perl xx.pl Exiting after catching signal SIGINT PC09​:/Tmp 506 $

Abe\, how about Win32?

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.7.3 & 631 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From @tux

On Wed 08 May 2002 16​:12\, \John\.Cullen@&#8203;portoeditora\.pt wrote​:

I have perl v5.6.1 installed under cygwin and this also does NOT crash.

------------------------------- Administrator@​JOHNCULLEN /cygdrive/f/TrabNT_JC/Projectos/Produtos/Perl Scripts $ perl -v

This is perl\, v5.6.1 built for cygwin-multi

Copyright 1987-2001\, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License\, which may be found in the Perl 5 source kit.

Complete documentation for Perl\, including FAQ lists\, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet\, point your browser at http​://www.perl.com/\, the Perl Home Page.

--------------------------------

however the same perl build (except for the fact it's ActiveState) in a DOS window bombs out. Anything in the handler is run (evidenced by printing something to stdout/stderr)\, as is "sub END" if it exists\, but then boom.

FYI cygwin is like unix (although it runs on windoze boxes) and is something   completely different from win32. Cygwin builds perl with GNU C-compiler   gcc and Win32 is build with M$ compiler

Your versions 5.6.1 says cygwin-multi (32 bit thread support)\, my 5.7.3 says cygwin-64int (64 bit no thread support). Both are very binary incompatible

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.7.3 & 631 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From [Unknown Contact. See original ticket]

FYI cygwin is like unix (although it runs on windoze boxes) and is something completely different from win32. Cygwin builds perl with GNU C-compiler gcc and Win32 is build with M$ compiler

.... and two more compilers are also supported in ./win32/*

Vadim.

p5pRT commented 22 years ago

From [Unknown Contact. See original ticket]

I have perl v5.6.1 installed under cygwin and this also does NOT crash.


Administrator@​JOHNCULLEN /cygdrive/f/TrabNT_JC/Projectos/Produtos/Perl Scripts $ perl -v

This is perl\, v5.6.1 built for cygwin-multi

Copyright 1987-2001\, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License\, which may be found in the Perl 5 source kit.

Complete documentation for Perl\, including FAQ lists\, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet\, point your browser at http​://www.perl.com/\, the Perl Home Page.


however the same perl build (except for the fact it's ActiveState) in a DOS window bombs out. Anything in the handler is run (evidenced by printing something to stdout/stderr)\, as is "sub END" if it exists\, but then boom.

John

-----Original Message----- From​: H.Merijn Brand [mailto​:h.m.brand@​hccnet.nl] Sent​: 08 May 2002 15​:10 To​: John Cullen Cc​: Perl 5 Porters; Abe Timmerman Subject​: Re​: [ID 20020508.008] "Unknown software exception" (crash) when using sigtrap in ActiveState Perl 5.6.1 build 631

On Wed 08 May 2002 15​:53\, John.Cullen@​portoeditora.pt wrote​:

The following code snippet causes perl to die with an "unknown software exception (0xc0000029)" when trying to use sigtrap to catch "ctrl-C" at a DOS prompt.

#!perl use sigtrap 'handler'\, \&my_handler\, 'normal-signals';

while (\<>) { # minimal code to provoke bug! }

sub my_handler { local($sig = shift @​_); print STDERR "Exiting after catching signal SIG$sig\n"; exit(0); }

Not with blead/cygwin/win2k

PC09​:/Tmp 504 $ perl -v

This is perl\, v5.7.3 built for cygwin-64int (with 1 registered patch\, see perl -V for more detail)

Copyright 1987-2002\, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License\, which may be found in the Perl 5 source kit.

Complete documentation for Perl\, including FAQ lists\, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet\, point your browser at http​://www.perl.com/\, the Perl Home Page.

PC09​:/Tmp 505 $ perl xx.pl Exiting after catching signal SIGINT PC09​:/Tmp 506 $

Abe\, how about Win32?

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.7.3 & 631 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\, WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/
perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From @tux

On Wed 08 May 2002 16​:26\, "Konovalov\, Vadim" \vkonovalov@&#8203;spb\.lucent\.com wrote​:

FYI cygwin is like unix (although it runs on windoze boxes) and is something completely different from win32. Cygwin builds perl with GNU C-compiler gcc and Win32 is build with M$ compiler

... and two more compilers are also supported in ./win32/*

I know\, but ActiveState builds with MS if I'm not mistaken.

Can you check this bug's state in blead? Abe's machine is kaputt

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.7.3 & 631 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From [Unknown Contact. See original ticket]

FYI cygwin is like unix (although it runs on windoze boxes) and is something completely different from win32. Cygwin builds perl with GNU C-compiler gcc and Win32 is build with M$ compiler

... and two more compilers are also supported in ./win32/*

I know\, but ActiveState builds with MS if I'm not mistaken.

Can you check this bug's state in blead? Abe's machine is kaputt

I checked\, and have following​: - 5.6.1\, activestate build\, really crashes - 5.6.1 (Borland C++)\, activestate build\, really crashes - perl@​16189 (Borland C++)\, does not crashes

Warmest wishes\, Vadim.

p5pRT commented 22 years ago

From @tux

On Wed 08 May 2002 16​:45\, "Konovalov\, Vadim" \vkonovalov@&#8203;spb\.lucent\.com wrote​:

FYI cygwin is like unix (although it runs on windoze boxes) and is something completely different from win32. Cygwin builds perl with GNU C-compiler gcc and Win32 is build with M$ compiler

... and two more compilers are also supported in ./win32/*

I know\, but ActiveState builds with MS if I'm not mistaken.

Can you check this bug's state in blead? Abe's machine is kaputt

I checked\, and have following​: - 5.6.1\, activestate build\, really crashes - 5.6.1 (Borland C++)\, activestate build\, really crashes - perl@​16189 (Borland C++)\, does not crashes

Then it can probably be closed as "fixed in blead"?

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.7.3 & 631 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 22 years ago

From [Unknown Contact. See original ticket]

H.Merijn Brand \h\.m\.brand@&#8203;hccnet\.nl writes​:

On Wed 08 May 2002 15​:53\, John.Cullen@​portoeditora.pt wrote​:

The following code snippet causes perl to die with an "unknown software exception (0xc0000029)" when trying to use sigtrap to catch "ctrl-C" at a DOS prompt.

Not with blead/cygwin/win2k

cygwin does its own signal faking so is very different to native Win32. Bleadperl has different signal handling\, and in addition native Win32 has an attempt to fake more POSIX-like (rather than ANSI C required) functionality for signals (still not as good as it could be).

-- Nick Ing-Simmons http​://www.ni-s.u-net.com/

p5pRT commented 22 years ago

From [Unknown Contact. See original ticket]

-----BEGIN PGP SIGNED MESSAGE-----

Moin\,

Re​: [ID 20020508.008] "Unknown software exception" (crash) when using sigtrap in ActiveState Perl 5.6.1 build 631

From​: "H.Merijn Brand" \h\.m\.brand@&#8203;hccnet\.nl To​: \John\.Cullen@&#8203;portoeditora\.pt Cc​: Perl 5 Porters \perl5\-porters@&#8203;perl\.org Date​: Wed\, 08 May 2002 16​:19​:57 +0200 Message-Id​: \20020508161633\.BABB\.H\.M\.BRAND@&#8203;hccnet\.nl

I run into a similiar problem (script using signals crashed at end of script) and was told back then "signals are totally unreliable under windows". Or something along these lines.

HTH\, Tels

- -- perl -MMath​::String -e 'print \ Math​::String->from_number("215960156869840440586892398248")\,"\n"'

http​://bloodgate.com/perl My current Perl projects PGP key available on http​://bloodgate.com/tels.asc or via email.

-----BEGIN PGP SIGNATURE----- Version​: GnuPG v1.0.6 (GNU/Linux) Comment​: When cryptography is outlawed\, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBPNlWPXcLPEOTuEwVAQFZQAf/Sqcd+XmzpN2pfha/NNfCgnFVqt31J7Cm H2dxBzvNbxNtSNb2cIUkHs8onpOBIqwYy/5Sqnyua2ayKOQIK9Uj30sfl2X0SnN/ Zz/AA79kTeGucU2S7MbDDzQN7ICtADo0FBfn++T3bCsWZRloqDmoAwKs/g+TcwJy BzWWeeMyGvZlrl9hdrRU+BMg0TsTKye4NjoWf3inOCVJJM5MuoQPD6b0mcX6T64+ 3qlso9DemdkcGY14M7xeyOC9YrMhkabdWtTy4W/Ejg79a7cbqWRotlithNR2//Pw gLgtTigXmyqIxu1/Ib8EJsAalWhPEL8xNpaAmBy33FyODxT8CIlg/w== =jvoF -----END PGP SIGNATURE-----

p5pRT commented 21 years ago

From acme@astray.com

This works fine in build 635\, so they must have fixed it.

p5pRT commented 21 years ago

acme@astray.com - Status changed from 'open' to 'resolved'