Navigation Menu

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

Not OK: perl 5.00560 on sun4-solaris 2.6 (UNINSTALLED) #331

Closed
p5pRT opened this issue Aug 3, 1999 · 9 comments
Closed

Not OK: perl 5.00560 on sun4-solaris 2.6 (UNINSTALLED) #331

p5pRT opened this issue Aug 3, 1999 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 3, 1999

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

Searchable as RT1160$

@p5pRT
Copy link
Author

p5pRT commented Aug 3, 1999

From lvirden@cas.org

When attempting to test a newly-built perl (directly out of the tar file)
I get these errors​:
pragma/warning......PROG​:
# op.c
$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; # known scalar leak
use warning 'unsafe' ;
my $a ; my @​a = () ; my %a = () ; my $b = \@​a ; my $c = \%a ;
@​a =~ /abc/ ;
@​a =~ s/a/b/ ;
@​a =~ tr/a/b/ ;
@​$b =~ /abc/ ;
@​$b =~ s/a/b/ ;
@​$b =~ tr/a/b/ ;
%a =~ /abc/ ;
%a =~ s/a/b/ ;
%a =~ tr/a/b/ ;
%$c =~ /abc/ ;
%$c =~ s/a/b/ ;
%$c =~ tr/a/b/ ;
{
no warning 'unsafe' ;
my $a ; my @​a = () ; my %a = () ; my $b = \@​a ; my $c = \%a ;
@​a =~ /abc/ ;
@​a =~ s/a/b/ ;
@​a =~ tr/a/b/ ;
@​$b =~ /abc/ ;
@​$b =~ s/a/b/ ;
@​$b =~ tr/a/b/ ;
%a =~ /abc/ ;
%a =~ s/a/b/ ;
%a =~ tr/a/b/ ;
%$c =~ /abc/ ;
%$c =~ s/a/b/ ;
%$c =~ tr/a/b/ ;
}
EXPECTED​:
Applying pattern match to @​array will act on scalar(@​array) at - line 5.
Applying substitution to @​array will act on scalar(@​array) at - line 6.
Can't modify private array in substitution at - line 6, near "s/a/b/ ;"
Applying character translation to @​array will act on scalar(@​array) at - line 7.
Applying pattern match to @​array will act on scalar(@​array) at - line 8.
Applying substitution to @​array will act on scalar(@​array) at - line 9.
Applying character translation to @​array will act on scalar(@​array) at - line 10.
Applying pattern match to %hash will act on scalar(%hash) at - line 11.
Applying substitution to %hash will act on scalar(%hash) at - line 12.
Applying character translation to %hash will act on scalar(%hash) at - line 13.
Applying pattern match to %hash will act on scalar(%hash) at - line 14.
Applying substitution to %hash will act on scalar(%hash) at - line 15.
Applying character translation to %hash will act on scalar(%hash) at - line 16.
BEGIN not safe after errors--compilation aborted at - line 18.
GOT​:
Applying pattern match to @​array will act on scalar(@​array) at - line 5.
Applying substitution to @​array will act on scalar(@​array) at - line 6.
Can't modify private array in substitution at - line 6, near "s/a/b/ ;"
Applying character translation to @​array will act on scalar(@​array) at - line 7.
Applying pattern match to @​array will act on scalar(@​array) at - line 8.
Applying substitution to @​array will act on scalar(@​array) at - line 9.
Applying character translation to @​array will act on scalar(@​array) at - line 10.
Applying pattern match to %hash will act on scalar(%hash) at - line 11.
Applying substitution to %hash will act on scalar(%hash) at - line 12.
Applying character translation to %hash will act on scalar(%hash) at - line 13.
Applying pattern match to %hash will act on scalar(%hash) at - line 14.
Applying substitution to %hash will act on scalar(%hash) at - line 15.
Applying character translation to %hash will act on scalar(%hash) at - line 16.
BEGIN not safe after errors--compilation aborted at - line 18.
Scalars leaked​: 1
FAILED at test 137

:
lib/db-btree........FAILED at test 36
lib/db-hash.........FAILED at test 31
:
lib/ph..............Integer overflow in hexadecimal number at (eval 325) line 1.
:

Perl Info


Site configuration information for perl 5.00560:

Configured by lwv26 at Tue Aug  3 14:33:22 EDT 1999.

Summary of my perl5 (revision 5.0 version 5 subversion 58) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos lwv26awu 5.6 generic_105181-14 sun4u sparc sunw,ultra-5_10 '
    config_args=''
    hint=previous, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    use64bits=undef usemultiplicity=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-DDEBUGGING -I/projects/gnu/sparc-sun-solaris2.6/include -I/vol/lwv26ldatae/include -I/usr/ccs/include -I/usr/include'
    ccflags ='-DDEBUGGING -I/projects/gnu/sparc-sun-solaris2.6/include -I/vol/lwv26ldatae/include -I/usr/ccs/include -I/usr/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-L/projects/gnu/sparc-sun-solaris2.6/lib -L/vol/lwv26ldatae/lib -L/usr/ccs/lib -R/projects/gnu/sparc-sun-solaris2.6/lib:/vol/lwv26ldatae/lib:/usr/ccs/lib'
    libpth=/projects/gnu/sparc-sun-solaris2.6/lib /vol/lwv26ldatae/lib /usr/ccs/lib /usr/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-R/projects/gnu/sparc-sun-solaris2.6/lib:/vol/lwv26ldatae/lib:/usr/ccs/lib -G -L/projects/gnu/sparc-sun-solaris2.6/lib -L/vol/lwv26ldatae/lib -L/usr/ccs/lib'

Locally applied patches:
    


@INC for perl 5.00560:
    lib
    /home/lwv26/lib/perl5/
    /projects/sprs_lwv/lib/perl5/
    /vol/lwv26ldatae/lib/perl5/5.006/sun4-solaris
    /vol/lwv26ldatae/lib/perl5/5.006
    /vol/lwv26ldatae/lib/perl5/site_perl/5.006/sun4-solaris
    /vol/lwv26ldatae/lib/site_perl
    .


Environment for perl 5.00560:
    HOME=/home/lwv26
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/lprod/cas/lib:/usr/dt/lib:/usr/openwin/lib:/usr/lib
    LOGDIR (unset)
    PATH=/opt/SUNWspro/bin:/ldatae/bin:/projects/sprs_lwv/sol26/bin:/projects/sprs_lwv/sol26/bin/mime:/projects/sprs_lwv/sol2/bin:/projects/sprs_lwv/bin:/projects/sprs_lwv/bin/mime:/home/lwv26/bin/D.news:/usr/perl5/bin:/projects/gnu/sparc-sun-solaris2.6/bin:/usr/tcl80/pd/sun4/bin:/usr/tcl80/pd/bin:/usr/tcl80/sun4/bin:/usr/tcl80/bin:/projects/xopsrc/sun4/bin:/projects/xopsrc/bin:/usr/atria/bin:/projects/intranet/bin:/projects/clearcase/bin:/vol/tclsrcsol/TclPro1.2/solaris-sparc/bin:/ldata2/teTeX/bin/sparc-sun-solaris2.6:/usr/tcl81/sun4/bin:/usr/tcl81/bin:/ldata/bin:/home/lwv26/bin/D.aws:/home/lwv26/bin/sol2:/home/lwv26/bin/D.frontend:/home/lwv26/bin/D.ksh:/cas/test/bin/sun4:/projects/sprs_lwv/bin/sol2:/usr/java1.2/bin:/home/lwv26/bin/sun4:/lprod/cas/bin:/usr/local/bin:/usr/dt/bin:/usr/openwin/bin:/bin:/cas/bin/sun4:/cas/abin/sun4:/cas/X11/sun4/bin:/usr/ccs/bin:/uprod/bin:/usr/sbin:/cas/tools/bin/sun4:/cas/X11/sun4/tools/bin:/usr/ucb:/home/lwv26/bin:/cas/tools/pdbin/sun4:/home/l!
wv26/bin/D.mistypes:/home/lwv26/bin/D.toys:/home/lwv26/bin/D.tools:/projects/npd/npdweb/bin-sol2
    PERL5LIB=/home/lwv26/lib/perl5/:/projects/sprs_lwv/lib/perl5/:
    PERLDOC=-t
    PERLLIB=/home/lwv26/lib/perl:/projects/sprs_lwv/lib/perl:
    PERL_BADLANG (unset)
    SHELL=/bin/sh

-- 
<URL: mailto:lvirden@cas.org> Quote: Saving the world before bedtime.
<*> O- <URL: http://www.purl.org/NET/lvirden/>
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
-><-

@p5pRT
Copy link
Author

p5pRT commented Aug 3, 1999

From @jhi

Larry W. Virden writes​:

pragma/warning......PROG​:
[snip]
FAILED at test 137

Of this I know nothing...

:
lib/db-btree........FAILED at test 36
lib/db-hash.........FAILED at test 31

These are known, a new DB_File ETA a couple of days.

lib/ph..............Integer overflow in hexadecimal number at (eval 325) line 1.

But of this I might know something. Could you debug a little bit
more? What does this hexadecimal number look like lib/ph is choking on?

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From @jhi

Please step through the t/lib/ph.t using the Perl debugger
so you'll probably see in greater detail what is happening.

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From [Unknown Contact. See original ticket]

  In-Reply-To​: <199908031921.PAA25742@​cas.org>
  References​: <199908031921.PAA25742@​cas.org>
  From​: Jarkko Hietaniemi <jhi@​iki.fi>
 
  > lib/ph..............Integer overflow in hexadecimal number
at (eval 325) line 1.
 
  But of this I might know something. Could you debug a little
bit
  more? What does this hexadecimal number look like lib/ph is
choking on?
 
 
$ cd t
$ ./perl t/lib/ph.t
1..84
ok 1
ok 2
ok 3
Integer overflow in hexadecimal number at (eval 325) line 1.

Running ./perl harness didn't do any better.

How can I determine what the hexadecimal number looks like?
There is no line 325 ...

--
Larry W. Virden <URL​: mailto​:lvirden@​cas.org> Windows is not the
answer, but
<URL​: http​://www.purl.org/NET/lvirden/> the question. No
is the answer.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From [Unknown Contact. See original ticket]

When I run the test under perl -d no warning occurs - only when I
run things outside of debug mode.

However! I do get​:

$ ./perl -w lib/ph.t
1..84
ok 1
ok 2
ok 3
Integer overflow in hexadecimal number at (eval 325) line 1.
Hexadecimal number > 0xffffffff non-portable at (eval 325) line
1.
ok 4
Argument "" isn't numeric in eq at lib/ph.t line 92.
Argument "" isn't numeric in eq at lib/ph.t line 92.
ok 5
Argument "^?" isn't numeric in eq at lib/ph.t line 92.
Argument "^?" isn't numeric in eq at lib/ph.t line 92.
ok 6

It seems like it would be worthwhile for many of the tests to run
with at least -w, if not -Mstrict, etc. so that one knows when
the tests are doing something unusual...

--
Larry W. Virden <URL​: mailto​:lvirden@​cas.org> Windows is not the
answer, but
<URL​: http​://www.purl.org/NET/lvirden/> the question. No
is the answer.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From [Unknown Contact. See original ticket]

On Wed, Aug 04, 1999 at 07​:53​:20AM -0400, Larry W. Virden wrote​:

When I run the test under perl -d no warning occurs - only when I
run things outside of debug mode.

However! I do get​:

$ ./perl -w lib/ph.t
1..84
ok 1
ok 2
ok 3
Integer overflow in hexadecimal number at (eval 325) line 1.
Hexadecimal number > 0xffffffff non-portable at (eval 325) line
1.
ok 4
Argument "" isn't numeric in eq at lib/ph.t line 92.
Argument "" isn't numeric in eq at lib/ph.t line 92.
ok 5
Argument "^?" isn't numeric in eq at lib/ph.t line 92.
Argument "^?" isn't numeric in eq at lib/ph.t line 92.
ok 6

It seems like it would be worthwhile for many of the tests to run
with at least -w, if not -Mstrict, etc. so that one knows when
the tests are doing something unusual...

  You have some pre-built .ph files on your system with noise
in them. The simplest way to nail this down quickly is to rebuild
the headers with diagnostic information in them . . .

  h2ph -a -h sys/types.h sys/socket.h netinet/in.h

  . . . and then re-run lib/ph.t. You'll get exact file and
line information.

  Peace,
* Kurt Starsinic (Kurt.Starsinic@​isinet.com) --------- Technical Specialist *
| `Perl is the Cliff Notes of Unix.' - Larry Wall |
Institute for Scientific Information http​://www.isinet.com/

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From [Unknown Contact. See original ticket]

From​: "Kurt D. Starsinic" <kstar@​chapin.edu>

  You have some pre-built .ph files on your system with noise
in them. The simplest way to nail this down quickly is to
rebuild
the headers with diagnostic information in them . . .

  h2ph -a -h sys/types.h sys/socket.h netinet/in.h

  . . . and then re-run lib/ph.t. You'll get exact file and
line information.

Thanks - here's more info​:

Integer overflow in hexadecimal number at sys/param.ph line 69.

Now, I am searching for that ph file .... I am uncertain how the
ph file line numbers correspond to the .h line numbers.

Okay, line 69 is​:

eval "\n#line 43 sys/param.ph\n" . 'sub SCTRSHFT () {9;}' unless
defined(&SC
TRSHFT);
  if(defined(&_LITTLE_ENDIAN)) {
  eval "\n#line 44 sys/param.ph\n" . 'sub lobyte {
  local($X) = @​_;
  eval q(((($X))[0]));
  }' unless defined(&lobyte);
  eval "\n#line 45 sys/param.ph\n" . 'sub hibyte {
  local($X) = @​_;
  eval q(((($X))[1]));
  }' unless defined(&hibyte);
 
 
Of the text above, the hibyte line is the line 69.

The code at that point in the actual .h file is​:

#define SCTRSHFT 9 /* Shift for BPSECT.
*/
 
#ifdef _LITTLE_ENDIAN
#define lobyte(X) (((unsigned char *)&(X))[0])
#define hibyte(X) (((unsigned char *)&(X))[1])
#define loword(X) (((ushort *)&(X))[0])
#define hiword(X) (((ushort *)&(X))[1])
#endif
#ifdef _BIG_ENDIAN
#define lobyte(X) (((unsigned char *)&(X))[1])
#define hibyte(X) (((unsigned char *)&(X))[0])
#define loword(X) (((ushort *)&(X))[1])
#define hiword(X) (((ushort *)&(X))[0])
#endif

Does this help?

Reminder​: SPARC Solaris 2.6.

--
Larry W. Virden <URL​: mailto​:lvirden@​cas.org> Windows is not the
answer, but
<URL​: http​://www.purl.org/NET/lvirden/> the question. No
is the answer.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From [Unknown Contact. See original ticket]

Okay, the line in question is​:

if(defined(&_NO_LONGLONG)) {
  eval "\n#line 68 sys/param.ph\n" . 'sub MAXOFFSET_T () {
&MAXOFF_T;}' un
less defined(&MAXOFFSET_T);
  } else {
  eval "\n#line 69 sys/param.ph\n" . 'sub MAXOFFSET_T ()
{0x7fffffffffffff
ff;}' unless defined(&MAXOFFSET_T);
  }

--
Larry W. Virden <URL​: mailto​:lvirden@​cas.org> Windows is not the
answer, but
<URL​: http​://www.purl.org/NET/lvirden/> the question. No
is the answer.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From @jhi

Larry W. Virden writes​:

Okay, the line in question is​:

if(defined(&_NO_LONGLONG)) {
eval "\n#line 68 sys/param.ph\n" . 'sub MAXOFFSET_T () {
&MAXOFF_T;}' un
less defined(&MAXOFFSET_T);
} else {
eval "\n#line 69 sys/param.ph\n" . 'sub MAXOFFSET_T ()
{0x7fffffffffffff
ff;}' unless defined(&MAXOFFSET_T);

Well, the Integer overflow warning is correct. If you are not
compiling with long longs, the 0x7fffffffffffff can't be kept on an
IV, so it overflows to an NV (potentially losing accuracy). Also the
(new) (and optional) portability warning is right​: the big number is
non-portable. Yes, on a .ph portability doesn't matter that much...

--
$jhi++; # http​://www.iki.fi/jhi/
  # There is this special biologist word we use for 'stable'.
  # It is 'dead'. -- Jack Cohen

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