[comp.lang.perl] perl 3@40 fails test lib.big

mf@ircam.fr (Michel Fingerhut) (11/11/90)

Setup: DECsystem 5810
       Ultrix 4.0

       Using cc to compile perl
       no optimization
       undef'ed volatile

When testing,
       lib.big.........FAILED on test 51

Help, anyone?

cander@unisoft.UUCP (Charles Anderson) (11/14/90)

From article <1990Nov10.230258.21946@ircam.ircam.fr>, by mf@ircam.fr (Michel Fingerhut):
> Setup: DECsystem 5810
>        Ultrix 4.0
> When testing,
>        lib.big.........FAILED on test 51
> Help, anyone?

I  can't offer any help, but I too am seeing problems with lib.big.

System: Pyramid-9820
        OSx128MNQ 5.0b-891013 
	BSD universe.

	Compiled with perl's malloc:
	    mallocsrc='malloc.c'
	    mallocobj='malloc.o'
	    usemymalloc='y'

When running lib.big alone,I get the following:
    ok 55
    Bad free() ignored at ./lib.big line 14, <DATA> line 60.
    ok 56
    ...
    ok 217
    not ok 218
    # '&bmod('+5000000000','+9');' expected: '+5' got: '+4'
    ok 219
    not ok 220
    # '&bmod('+7000000000','+9');' expected: '+7' got: '+6'
    ok 221


-- 

Unix is the Winchester Mystery   |  Charles Anderson, UniSoft Corp.
House of software design.        |  {sun, ucbvax, uunet}!unisoft!cander

gorpong@ping.uucp (Gordon C. Galligher) (11/14/90)

In article <1990Nov10.230258.21946@ircam.ircam.fr> mf@ircam.fr (Michel Fingerhut) writes:
>Setup: DECsystem 5810
>       Ultrix 4.0
>
>       Using cc to compile perl
>       no optimization
>       undef'ed volatile
>
>When testing,
>       lib.big.........FAILED on test 51
>
>Help, anyone?

I have an 80386 and used the GCC 1.37 compiler (with -g -O -fpcc-struct-return)
and lib.big fails on test 6, when run from "make test."  If I cd t and then
execute ./perl lib.big, every test comes out OK.  I am confused, but it does
work.  I also believe that the first line of lib.big should be ./perl -x
not just perl, in order to take advantage of the __END__ stuff in the file.
I executed ./perl lib.big and ./perl -x lib.big and it works regardless of
the -x switch.  Is it a side effect that if an __END__ exists then the rest
is automatically used as <DATA> and the -x is not needed, or is the -x merely
there to tell perl to skip to a #!perl and start executing to an __END__?

		-- Gordon.

-- 
Gordon C. Galligher	9127 Potter Rd. #2E	Des Plaines, IL    60016-4881
	     ...!uunet!telxon!teleng!ping!gorpong

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (11/16/90)

In article <1990Nov14.140021.5953@ping.uucp> gorpong@ping.uucp (Gordon C. Galligher) writes:
: I also believe that the first line of lib.big should be ./perl -x
: not just perl, in order to take advantage of the __END__ stuff in the file.
: I executed ./perl lib.big and ./perl -x lib.big and it works regardless of
: the -x switch.  Is it a side effect that if an __END__ exists then the rest
: is automatically used as <DATA> and the -x is not needed, or is the -x merely
: there to tell perl to skip to a #!perl and start executing to an __END__?

The -x has nothing to do with __END__, other than the similarity that
both are used to trim excess garbage from a script.  The -x lets you trim
garbage before #!.  The __END__ lets you trim garbage after the __END__.

The -x is really only useful when the #! line is not the first line of the
file.  Ordinary scripts never need it--the intent is to allow you to pipe
articles to perl that contain scripts.

<DATA> will work any time there is an __END__.

Your make problem sounds like it stems from a make that supplies a different
context than the shell.  Perhaps there is some subtle interaction between
DATA and STD{IN,OUT,ERR}.  Some makes attach STDIN to /dev/null, for
instance.  I don't know why that would louse up DATA though.

Larry