Skip to content
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

Test failures on amd64-freebsd 6.2 #9030

Closed
p5pRT opened this issue Sep 18, 2007 · 16 comments
Closed

Test failures on amd64-freebsd 6.2 #9030

p5pRT opened this issue Sep 18, 2007 · 16 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 18, 2007

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

Searchable as RT45513$

@p5pRT
Copy link
Author

p5pRT commented Sep 18, 2007

From srezic@cpan.org

Created by srezic@cpan.org

With bleedperl I get the following test failures​:

t/io/pipe.....................................................FAILED--expected 24 tests, saw 8

ext/IO/t/io_pipe..............................................FAILED--expected 10 tests, saw 8

ext/Time/HiRes/t/HiRes........................................
../ext/Time/HiRes/t/HiRes.t​: overall time allowed for tests (90s) exceeded!
FAILED--expected 38 tests, saw 11

The following two look fishy, but do not generate a failure​:

ext/IPC/SysV/t/ipcsysv........................................# cannot proceed​: semget() error​: No space left on device
ok

lib/CPANPLUS/t/40_CPANPLUS-Internals-Report...................Integer overflow in version at /mnt/i386/usr/local/src/bleedperl-amd64/t/../lib/version.pm line 19.
# Looks like your test died just after 60.
ok

With another configuration (debugging turned on, maybe other changes too)
I got another test failure​:

ext/File/Glob/t/basic.........................................FAILED at test 8

Regards,
  Slaven

Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl 5.10.0:

Configured by eserte at Tue Sep 18 22:12:47 CEST 2007.

Summary of my perl5 (revision 5 version 10 subversion 0 patch 31894) configuration:
  Platform:
    osname=freebsd, osvers=6.2-release, archname=amd64-freebsd
    uname='freebsd biokovo-amd64.herceg.de 6.2-release freebsd 6.2-release #0: fri jan 12 08:32:24 utc 2007 root@portnoy.cse.buffalo.edu:usrobjusrsrcsysgeneric amd64 '
    config_args='-Dprefix=/usr/perl5.10.0 -D cc=ccache cc -Dgccansipedantic -de'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='ccache cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include',
    optimize='-O2 -pipe',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='3.4.6 [FreeBSD] 20060305', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ccache cc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:
    DEVEL


@INC for perl 5.10.0:
    lib
    /usr/perl5.10.0/lib/5.10.0/amd64-freebsd
    /usr/perl5.10.0/lib/5.10.0
    /usr/perl5.10.0/lib/site_perl/5.10.0/amd64-freebsd
    /usr/perl5.10.0/lib/site_perl/5.10.0
    .


Environment for perl 5.10.0:
    HOME=/home/e/eserte
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=de_DE.ISO8859-1
    LC_CTYPE=de_DE.ISO8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/X11R6/bin:/usr/X11/bin:/usr/local/bin:/usr/bin:/bin:/usr/gnu/bin:/usr/TeX/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/pilot/bin:/home/e/eserte/bin/FreeBSD:/home/e/eserte/bin/sh:/home/e/eserte/bin:/usr/X386/bin:/usr/games:/home/e/eserte/devel
    PERL_BADLANG (unset)
    PERL_HTML_DISPLAY_CLASS=HTML::Display::Mozilla
    SHELL=/bin/tcsh

@p5pRT
Copy link
Author

p5pRT commented Sep 19, 2007

From david@landgren.net

srezic@​cpan.org (via RT) wrote​:

# New Ticket Created by srezic@​cpan.org
# Please include the string​: [perl #45513]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=45513 >

This is a bug report for perl from srezic@​cpan.org,
generated with the help of perlbug 1.36 running under perl 5.10.0.

-----------------------------------------------------------------
[Please enter your report here]

With bleedperl I get the following test failures​:

t/io/pipe.....................................................FAILED--expected 24 tests, saw 8

ext/IO/t/io_pipe..............................................FAILED--expected 10 tests, saw 8

ext/Time/HiRes/t/HiRes........................................
../ext/Time/HiRes/t/HiRes.t​: overall time allowed for tests (90s) exceeded!
FAILED--expected 38 tests, saw 11

The following two look fishy, but do not generate a failure​:

ext/IPC/SysV/t/ipcsysv........................................# cannot proceed​: semget() error​: No space left on device
ok

This at least is normal, it's a question of resource acquisition. I
think your kernel semaphore configuration is lower than the amount of
semaphores the test wants to use.

That should probably be a skip(), come to think of it.

David

@p5pRT
Copy link
Author

p5pRT commented Sep 19, 2007

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 19, 2007

From @eserte

David Landgren <david@​landgren.net> writes​:

srezic@​cpan.org (via RT) wrote​:

# New Ticket Created by srezic@​cpan.org # Please include the
string​: [perl #45513]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=45513 >
This is a bug report for perl from srezic@​cpan.org,
generated with the help of perlbug 1.36 running under perl 5.10.0.
-----------------------------------------------------------------
[Please enter your report here]
With bleedperl I get the following test failures​:
t/io/pipe.....................................................FAILED--expected
24 tests, saw 8
ext/IO/t/io_pipe..............................................FAILED--expected
10 tests, saw 8
ext/Time/HiRes/t/HiRes........................................
../ext/Time/HiRes/t/HiRes.t​: overall time allowed for tests (90s) exceeded!
FAILED--expected 38 tests, saw 11
The following two look fishy, but do not generate a failure​:
ext/IPC/SysV/t/ipcsysv........................................#
cannot proceed​: semget() error​: No space left on device
ok

This at least is normal, it's a question of resource acquisition. I
think your kernel semaphore configuration is lower than the amount of
semaphores the test wants to use.

That should probably be a skip(), come to think of it.

Or just lower the number of semaphores to acquire. I only seem to have
three semaphores used on my system​:

$ ipcs -s
Semaphores​:
T ID KEY MODE OWNER GROUP
s 65536 5432001 --rw------- pgsql pgsql
s 65537 5432002 --rw------- pgsql pgsql
s 65538 5432003 --rw------- pgsql pgsql

These kernel limits seem to apply to semaphores​:

kern.ipc.semaem​: 16384
kern.ipc.semvmx​: 32767
kern.ipc.semusz​: 104
kern.ipc.semume​: 10
kern.ipc.semopm​: 100
kern.ipc.semmsl​: 60
kern.ipc.semmnu​: 30
kern.ipc.semmns​: 60
kern.ipc.semmni​: 10
kern.ipc.semmap​: 30

Maybe one of the both limits with the value "10" are hitting here
(including some kind of off-by-one error), because if I reduce the
number of semaphores created by the test from 10 to 9, then the test
passes without problems.

I propose the following patch​:

Inline Patch
--- bleedperl-amd64/ext/IPC/SysV/t/ipcsysv.t	Tue Jun 13 21:29:08 2006
+++ bleedperl2-amd64/ext/IPC/SysV/t/ipcsysv.t	Wed Sep 19 21:49:03 2007
@@ -148,8 +148,11 @@ SKIP: {
 
     use IPC::SysV qw(IPC_CREAT GETALL SETALL);
 
+    # FreeBSD's default limit seems to be 9
+    my $nsem = 5;
+
     my $test_name = 'sem acquire';
-    $sem = semget(IPC_PRIVATE, 10, $perm | IPC_CREAT);
+    $sem = semget(IPC_PRIVATE, $nsem, $perm | IPC_CREAT);
     if ($sem) {
         pass($test_name);
     }
@@ -166,8 +169,6 @@ SKIP: {
     ok(semctl($sem,0,IPC_STAT,$data),'sem data call');
     
     cmp_ok(length($data),'>',0,'sem data len');
-
-    my $nsem = 10;
 
     ok(semctl($sem,0,SETALL,pack("s!*",(0) x $nsem)), 'set all sems');
 



-- 

Slaven Rezic - slaven <at> rezic <dot> de

  tksm - Perl/Tk program for searching and replacing in multiple files
  http​://ptktools.sourceforge.net/#tksm

@p5pRT
Copy link
Author

p5pRT commented Sep 21, 2007

From david@landgren.net

Slaven Rezic wrote​:

David Landgren <david@​landgren.net> writes​:

srezic@​cpan.org (via RT) wrote​:

# New Ticket Created by srezic@​cpan.org # Please include the
string​: [perl #45513]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=45513 >
This is a bug report for perl from srezic@​cpan.org,
generated with the help of perlbug 1.36 running under perl 5.10.0.
-----------------------------------------------------------------
[Please enter your report here]
With bleedperl I get the following test failures​:
t/io/pipe.....................................................FAILED--expected
24 tests, saw 8
ext/IO/t/io_pipe..............................................FAILED--expected
10 tests, saw 8
ext/Time/HiRes/t/HiRes........................................
../ext/Time/HiRes/t/HiRes.t​: overall time allowed for tests (90s) exceeded!
FAILED--expected 38 tests, saw 11
The following two look fishy, but do not generate a failure​:
ext/IPC/SysV/t/ipcsysv........................................#
cannot proceed​: semget() error​: No space left on device
ok
This at least is normal, it's a question of resource acquisition. I
think your kernel semaphore configuration is lower than the amount of
semaphores the test wants to use.

That should probably be a skip(), come to think of it.

Or just lower the number of semaphores to acquire. I only seem to have
three semaphores used on my system​:

$ ipcs -s
Semaphores​:
T ID KEY MODE OWNER GROUP
s 65536 5432001 --rw------- pgsql pgsql
s 65537 5432002 --rw------- pgsql pgsql
s 65538 5432003 --rw------- pgsql pgsql

These kernel limits seem to apply to semaphores​:

kern.ipc.semaem​: 16384
kern.ipc.semvmx​: 32767
kern.ipc.semusz​: 104
kern.ipc.semume​: 10
kern.ipc.semopm​: 100
kern.ipc.semmsl​: 60
kern.ipc.semmnu​: 30
kern.ipc.semmns​: 60
kern.ipc.semmni​: 10
kern.ipc.semmap​: 30

Maybe one of the both limits with the value "10" are hitting here
(including some kind of off-by-one error), because if I reduce the
number of semaphores created by the test from 10 to 9, then the test
passes without problems.

I propose the following patch​:

--- bleedperl-amd64/ext/IPC/SysV/t/ipcsysv.t Tue Jun 13 21​:29​:08 2006
+++ bleedperl2-amd64/ext/IPC/SysV/t/ipcsysv.t Wed Sep 19 21​:49​:03 2007
@​@​ -148,8 +148,11 @​@​ SKIP​: {

 use IPC&#8203;::SysV qw\(IPC\_CREAT GETALL SETALL\);

+ # FreeBSD's default limit seems to be 9
+ my $nsem = 5;

Maybe 10 was chosen because it exercises problems on other platforms? So...

  my $nsem = $^O eq 'freebsd' ? 5 : 10;

David

+
my $test_name = 'sem acquire';
- $sem = semget(IPC_PRIVATE, 10, $perm | IPC_CREAT);
+ $sem = semget(IPC_PRIVATE, $nsem, $perm | IPC_CREAT);
if ($sem) {
pass($test_name);
}
@​@​ -166,8 +169,6 @​@​ SKIP​: {
ok(semctl($sem,0,IPC_STAT,$data),'sem data call');

 cmp\_ok\(length\($data\)\,'>'\,0\,'sem data len'\);

-
- my $nsem = 10;

 ok\(semctl\($sem\,0\,SETALL\,pack\("s\!\*"\,\(0\) x $nsem\)\)\, 'set all sems'\);

@p5pRT
Copy link
Author

p5pRT commented Sep 25, 2007

From @rgs

On 19 Sep 2007 21​:56​:00 +0200, Slaven Rezic <slaven@​rezic.de> wrote​:

Or just lower the number of semaphores to acquire. I only seem to have
three semaphores used on my system​:

$ ipcs -s
Semaphores​:
T ID KEY MODE OWNER GROUP
s 65536 5432001 --rw------- pgsql pgsql
s 65537 5432002 --rw------- pgsql pgsql
s 65538 5432003 --rw------- pgsql pgsql

These kernel limits seem to apply to semaphores​:

kern.ipc.semaem​: 16384
kern.ipc.semvmx​: 32767
kern.ipc.semusz​: 104
kern.ipc.semume​: 10
kern.ipc.semopm​: 100
kern.ipc.semmsl​: 60
kern.ipc.semmnu​: 30
kern.ipc.semmns​: 60
kern.ipc.semmni​: 10
kern.ipc.semmap​: 30

Maybe one of the both limits with the value "10" are hitting here
(including some kind of off-by-one error), because if I reduce the
number of semaphores created by the test from 10 to 9, then the test
passes without problems.

I propose the following patch​:

Thanks, applied as #31967.

@p5pRT
Copy link
Author

p5pRT commented Sep 29, 2007

From @eserte

The test failures were all caused by SIGBUS or SIGILL signals when
calling a signal handler. gdb stopped at the beginning of
Perl_csighandler in mg.c. So I just guessed and replaced the variable
argument list with the "real" arguments needed by a sigaction handler,
and the problem vanished​: all tests pass.

I am not sure if the attached patch is correct. Are there systems which
need the variable argument list? If so, then we probably need a
configure test and keep also the old va_arg code.

Regards,
  Slaven

@p5pRT
Copy link
Author

p5pRT commented Sep 29, 2007

From @eserte

csighandler.patch
# 
# 
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####

#### Patch data follows ####
diff -up 'bleedperl-amd64/embed.fnc' 'bleedperl2-amd64/embed.fnc'
Index: ./embed.fnc
--- ./embed.fnc	Mon Sep 17 23:08:36 2007
+++ ./embed.fnc	Wed Sep 19 21:58:57 2007
@@ -787,8 +787,8 @@ p	|I32	|setenv_getix	|NN const char* nam
 EXp	|void	|setdefout	|NULLOK GV* gv
 Ap	|HEK*	|share_hek	|NN const char* str|I32 len|U32 hash
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-np	|Signal_t |sighandler	|int sig|...
-Anp	|Signal_t |csighandler	|int sig|...
+np	|Signal_t |sighandler	|int sig|NULLOK siginfo_t *info|NULLOK void *uap
+Anp	|Signal_t |csighandler	|int sig|NULLOK siginfo_t *info|NULLOK void *uap
 #else
 np	|Signal_t |sighandler	|int sig
 Anp	|Signal_t |csighandler	|int sig
diff -up 'bleedperl-amd64/embed.h' 'bleedperl2-amd64/embed.h'
Index: ./embed.h
--- ./embed.h	Mon Sep 17 23:08:36 2007
+++ ./embed.h	Wed Sep 19 22:20:46 2007
@@ -3104,7 +3104,9 @@
 #define share_hek(a,b,c)	Perl_share_hek(aTHX_ a,b,c)
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
 #ifdef PERL_CORE
+#define sighandler		Perl_sighandler
 #endif
+#define csighandler		Perl_csighandler
 #else
 #ifdef PERL_CORE
 #define sighandler		Perl_sighandler
diff -up 'bleedperl-amd64/mg.c' 'bleedperl2-amd64/mg.c'
Index: ./mg.c
--- ./mg.c	Fri Aug 31 11:08:42 2007
+++ ./mg.c	Wed Sep 19 22:12:27 2007
@@ -56,7 +56,7 @@ tie.
 #endif
 
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-Signal_t Perl_csighandler(int sig, ...);
+Signal_t Perl_csighandler(int sig, siginfo_t *, void *);
 #else
 Signal_t Perl_csighandler(int sig);
 #endif
@@ -1307,7 +1307,7 @@ S_raise_signal(pTHX_ int sig)
 
 Signal_t
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-Perl_csighandler(int sig, ...)
+Perl_csighandler(int sig, siginfo_t *sip PERL_UNUSED_DECL, void *uap PERL_UNUSED_DECL)
 #else
 Perl_csighandler(int sig)
 #endif
@@ -1318,7 +1318,6 @@ Perl_csighandler(int sig)
     dTHX;
 #endif
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-   va_list args;
 #endif
 #ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
     (void) rsignal(sig, PL_csighandlerp);
@@ -1333,7 +1332,6 @@ Perl_csighandler(int sig)
 #endif
 #endif
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-   va_start(args, sig);
 #endif
    if (
 #ifdef SIGILL
@@ -1352,7 +1350,6 @@ Perl_csighandler(int sig)
    else
 	S_raise_signal(aTHX_ sig);
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-   va_end(args);
 #endif
 }
 
@@ -2778,7 +2775,7 @@ Perl_whichsig(pTHX_ const char *sig)
 
 Signal_t
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-Perl_sighandler(int sig, ...)
+Perl_sighandler(int sig, siginfo_t *sip, void *uap PERL_UNUSED_DECL)
 #else
 Perl_sighandler(int sig)
 #endif
@@ -2856,11 +2853,6 @@ Perl_sighandler(int sig)
 	 struct sigaction oact;
 
 	 if (sigaction(sig, 0, &oact) == 0 && oact.sa_flags & SA_SIGINFO) {
-	      siginfo_t *sip;
-	      va_list args;
-
-	      va_start(args, sig);
-	      sip = (siginfo_t*)va_arg(args, siginfo_t*);
 	      if (sip) {
 		   HV *sih = newHV();
 		   SV *rv  = newRV_noinc((SV*)sih);
@@ -2881,7 +2873,6 @@ Perl_sighandler(int sig)
 		   PUSHs(newSVpv((char *)sip, sizeof(*sip)));
 	      }
 
-              va_end(args);
 	 }
     }
 #endif
diff -up 'bleedperl-amd64/proto.h' 'bleedperl2-amd64/proto.h'
Index: ./proto.h
--- ./proto.h	Mon Sep 17 23:08:36 2007
+++ ./proto.h	Wed Sep 19 22:20:46 2007
@@ -2133,8 +2133,8 @@ PERL_CALLCONV HEK*	Perl_share_hek(pTHX_ 
 			__attribute__nonnull__(pTHX_1);
 
 #if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
-PERL_CALLCONV Signal_t	Perl_sighandler(int sig, ...);
-PERL_CALLCONV Signal_t	Perl_csighandler(int sig, ...);
+PERL_CALLCONV Signal_t	Perl_sighandler(int sig, siginfo_t *info, void *uap);
+PERL_CALLCONV Signal_t	Perl_csighandler(int sig, siginfo_t *info, void *uap);
 #else
 PERL_CALLCONV Signal_t	Perl_sighandler(int sig);
 PERL_CALLCONV Signal_t	Perl_csighandler(int sig);
#### End of Patch data ####

#### ApplyPatch data follows ####
# Data version        : 1.0
# Date generated      : Wed Sep 19 23:31:03 2007
# Generated by        : makepatch 2.03
# Recurse directories : Yes
# Excluded files      : (\A|/).*\~\Z
#                       (\A|/).*\.a\Z
#                       (\A|/).*\.bak\Z
#                       (\A|/).*\.BAK\Z
#                       (\A|/).*\.elc\Z
#                       (\A|/).*\.exe\Z
#                       (\A|/).*\.gz\Z
#                       (\A|/).*\.ln\Z
#                       (\A|/).*\.o\Z
#                       (\A|/).*\.obj\Z
#                       (\A|/).*\.olb\Z
#                       (\A|/).*\.old\Z
#                       (\A|/).*\.orig\Z
#                       (\A|/).*\.rej\Z
#                       (\A|/).*\.so\Z
#                       (\A|/).*\.Z\Z
#                       (\A|/)\.del\-.*\Z
#                       (\A|/)\.make\.state\Z
#                       (\A|/)\.nse_depinfo\Z
#                       (\A|/)core\Z
#                       (\A|/)tags\Z
#                       (\A|/)TAGS\Z
#                       (\A|/)ipcsysv\.t\Z
#                       (\A|/)perlapi\.pod\Z
#                       (\A|/)perlintern\.pod\Z
# v 'patchlevel.h' 4734 1189085187 33060
# p 'embed.fnc' 79366 1190231937 0100664
# p 'embed.h' 167123 1190233246 0100660
# p 'mg.c' 72673 1190232747 0100664
# p 'proto.h' 160891 1190233246 0100660
#### End of ApplyPatch data ####

#### End of Patch kit [created: Wed Sep 19 23:31:03 2007] ####
#### Patch checksum: 160 5360 53935 ####
#### Checksum: 178 5985 39977 ####

@p5pRT
Copy link
Author

p5pRT commented Oct 3, 2007

From @rgs

On 29/09/2007, slaven@​rezic.de via RT <perlbug-followup@​perl.org> wrote​:

The test failures were all caused by SIGBUS or SIGILL signals when
calling a signal handler. gdb stopped at the beginning of
Perl_csighandler in mg.c. So I just guessed and replaced the variable
argument list with the "real" arguments needed by a sigaction handler,
and the problem vanished​: all tests pass.

I am not sure if the attached patch is correct. Are there systems which
need the variable argument list? If so, then we probably need a
configure test and keep also the old va_arg code.

We'll see with the smokes. Thanks, applied as 32012, amended as 32013.

@p5pRT
Copy link
Author

p5pRT commented Oct 4, 2007

From @steve-m-hay

Rafael Garcia-Suarez wrote​:

On 29/09/2007, slaven@​rezic.de via RT <perlbug-followup@​perl.org>
wrote​:

The test failures were all caused by SIGBUS or SIGILL signals when
calling a signal handler. gdb stopped at the beginning of
Perl_csighandler in mg.c. So I just guessed and replaced the variable
argument list with the "real" arguments needed by a sigaction
handler, and the problem vanished​: all tests pass.

I am not sure if the attached patch is correct. Are there systems
which need the variable argument list? If so, then we probably need a
configure test and keep also the old va_arg code.

We'll see with the smokes. Thanks, applied as 32012, amended as 32013.

That's given me some new warnings on Win32 (with VC6)​:

[miniperl compilation of mg.c​:]
..\mg.c(1349) : warning C4020​: 'PL_sighandlerp' : too many actual
parameters
..\mg.c(1388) : warning C4020​: 'PL_sighandlerp' : too many actual
parameters

[perl compilation of mg.c​:}
..\mg.c(1349) : warning C4020​: 'function through pointer' : too many
actual parameters
..\mg.c(1388) : warning C4020​: 'function through pointer' : too many
actual parameters

@p5pRT
Copy link
Author

p5pRT commented Oct 4, 2007

From @rgs

On 04/10/2007, Steve Hay <SteveHay@​planit.com> wrote​:

That's given me some new warnings on Win32 (with VC6)​:

[miniperl compilation of mg.c​:]
..\mg.c(1349) : warning C4020​: 'PL_sighandlerp' : too many actual
parameters
..\mg.c(1388) : warning C4020​: 'PL_sighandlerp' : too many actual
parameters

I would have been surprised if no problem was discovered.
I see in win32/win32.h​:
typedef Signal_t (*Sighandler_t) (int);
Does change 32020 make the situation better?

@p5pRT
Copy link
Author

p5pRT commented Oct 4, 2007

From @steve-m-hay

Rafael Garcia-Suarez wrote​:

On 04/10/2007, Steve Hay <SteveHay@​planit.com> wrote​:

That's given me some new warnings on Win32 (with VC6)​:

[miniperl compilation of mg.c​:]
..\mg.c(1349) : warning C4020​: 'PL_sighandlerp' : too many actual
parameters ..\mg.c(1388) : warning C4020​: 'PL_sighandlerp' : too
many actual parameters

I would have been surprised if no problem was discovered.
I see in win32/win32.h​:
typedef Signal_t (*Sighandler_t) (int);
Does change 32020 make the situation better?

Yes, that's fixed it, thanks.

@p5pRT
Copy link
Author

p5pRT commented Oct 4, 2007

From @craigberry

On 10/4/07, Steve Hay <SteveHay@​planit.com> wrote​:

Rafael Garcia-Suarez wrote​:

On 04/10/2007, Steve Hay <SteveHay@​planit.com> wrote​:

That's given me some new warnings on Win32 (with VC6)​:

[miniperl compilation of mg.c​:]
..\mg.c(1349) : warning C4020​: 'PL_sighandlerp' : too many actual
parameters ..\mg.c(1388) : warning C4020​: 'PL_sighandlerp' : too
many actual parameters

I would have been surprised if no problem was discovered.
I see in win32/win32.h​:
typedef Signal_t (*Sighandler_t) (int);
Does change 32020 make the situation better?

Yes, that's fixed it, thanks.

Does Win32 have SA_SIGINFO defined? Based on how the prototypes are
defined we may, instead of this​:

#ifdef WIN32
  (*PL_sighandlerp)(sig);
#else
  (*PL_sighandlerp)(sig, NULL, NULL);
#endif

want this​:

#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
  (*PL_sighandlerp)(sig, NULL, NULL);
#else
  (*PL_sighandlerp)(sig);
#endif

It's also rather curious that at lines 1356-57 of mg.c became​:

#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
#endif

with nothing between the #if and #endif..

In any case, the compile was failinng on VMS like so​:

  1 83084 (*PL_sighandlerp)(sig, NULL, NULL);
  ........1
%CC-E-TOOMANYARGS, (1) In this statement, "(*(my_perl->Isighandlerp))"
expects 1 arguments, but 3 are supplied.

HAS_SIGACTION is defined but SA_SIGINFO is not on VMS.

I went ahead and checked in my suggestion as 32027. Please holler if
that breaks Win32 again. I don't know why it wouuld as it appears the
whole idea of SA_SIGINFO is to indicate whether you are passing one
argument or three to the handler.

@p5pRT
Copy link
Author

p5pRT commented Oct 4, 2007

From @steve-m-hay

Craig A. Berry wrote​:

On 10/4/07, Steve Hay <SteveHay@​planit.com> wrote​:

Rafael Garcia-Suarez wrote​:

On 04/10/2007, Steve Hay <SteveHay@​planit.com> wrote​:

That's given me some new warnings on Win32 (with VC6)​:

[miniperl compilation of mg.c​:]
..\mg.c(1349) : warning C4020​: 'PL_sighandlerp' : too many actual
parameters ..\mg.c(1388) : warning C4020​: 'PL_sighandlerp' : too
many actual parameters

I would have been surprised if no problem was discovered. I see in
win32/win32.h​: typedef Signal_t (*Sighandler_t) (int);
Does change 32020 make the situation better?

Yes, that's fixed it, thanks.

Does Win32 have SA_SIGINFO defined?
[...]
I went ahead and checked in my suggestion as 32027. Please holler if
that breaks Win32 again. I don't know why it wouuld as it appears the
whole idea of SA_SIGINFO is to indicate whether you are passing one
argument or three to the handler.

Win32 doesn't even have HAS_SIGACTION defined, so it's still OK after
your change.

@p5pRT
Copy link
Author

p5pRT commented Nov 4, 2007

From @eserte

Seems to be solved now.

Slaven

@p5pRT
Copy link
Author

p5pRT commented Dec 19, 2007

@smpeters - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant