FAQ
Hi;

The following problem was encountered while trying to build Perl 5.x on a
CRAY SV1 system; "miniperl aborts with a "Error exit" during Perl make."


cc -o miniperl \
miniperlmain.o opmini.o libperl.a -lnsl -lmalloc -lc -lcrypt
./miniperl -w -Ilib -MExporter -e '<?>' || make minitest
sh: 66414 Error exit(coredump)

The Error exit is caused by a jump in Perl_filter_read() to a "invalid"
read_e_script() function address.


The problem arises when the following statement in Perl_filter_add() is used
to insert the 'pre-processing' function read_e_script() into the current source
input stream.

IoDIRP(datasv) = (DIR*)funcp; /* stash funcp into spare field */

The statement involves a cast form pointer-to-function to pointer-to-object
which subsequently causes the function address value to be converted to a word
(object) address. Probably not a problem on byte-addressable machines but this
casting results in the parcel bits being "lost" (shifted off) from the function
address. When the following statement is used in Perl_filter_read(() to "fetch"
the pre-processing function address

funcp = (filter_t)IoDIRP(datasv);

the cast from pointer-to-object to pointer-to-function results in the word
address being "restored" to a parcel address but the parcel bits will now
be zero. Consequently, the parcel address of 10531d for read_e_script() gets
transformed to 10351a. So now the (*funcp) call in Perl_read_filter()

return (*funcp)(idx, buf_sv, maxlen);

ends up jumping to a address which is 3 parcels shy of the read_e_script() entry
point in Perl_my_unexec() causing the third parcel of a A-register load (value
00002) to be executed as a ERR instruction.


The problem is evident from a "filter_debug" trace

Use of uninitialized value.
filter_add func 4567 ().
Use of uninitialized value.
filter_read 0: via function 4564 ()
Error exit (core dumped)

which shows filter_read using the incorrect function address. The low-order
two bits of the function address is the parcel address.


The problem occurred when building Perl versions 5.004_05 and 5.6_0.


./myconfig output:

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=unicos, osvers=10.0.0.7, archname=CRAY_SV1-unicos
uname='sn9617 wind 10.0.0.7 roo.0 cray sv1 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=define use64bitall=define uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O1', gccversion=
cppflags=''
ccflags =''
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=8, longsize=8, ptrsize=8, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='int', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags =''
libpth=/lib /usr/lib
libs=-lnsl -lmalloc -lc -lcrypt
libc=/lib/libc.a, so=none, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
cccdlflags='', lddlflags=''


Please contact me if you need additional information.

Regards,

Gordon Miller

+--------------------------------------------------------+
Gordon J. Miller | email: gjm@cray.com |
Cray Inc. | phone: 651-683-5707 |
Software Product Support | FAX: 651-683-5307 |
+--------------------------------------------------------+

In the path of our happiness shall we find the
learning for which we have chosen this lifetime.
- Richard Bach "Illusions"


If God had meant man to fly,
He would have given him more money.

Search Discussions

  • Jarkko Hietaniemi at Aug 3, 2000 at 11:34 pm

    On Thu, Aug 03, 2000 at 02:04:26PM -0500, gjm@cray.com wrote:
    Hi;

    The following problem was encountered while trying to build Perl 5.x on a
    CRAY SV1 system; "miniperl aborts with a "Error exit" during Perl make."


    cc -o miniperl \
    miniperlmain.o opmini.o libperl.a -lnsl -lmalloc -lc -lcrypt
    ./miniperl -w -Ilib -MExporter -e '<?>' || make minitest
    sh: 66414 Error exit(coredump)

    The Error exit is caused by a jump in Perl_filter_read() to a "invalid"
    read_e_script() function address.
    Thank you for your bug report, and an excellent analysis. I believe
    that this problem was fixed back in June/early July, this problem
    report looks very similar:

    http://bugs.perl.org/perlbug.cgi?req=tid&tid=20000612.002&range=23831&format=H

    You might want to try this snapshot

    http://www.iki.fi/jhi/perl@6506.tgz

    which contains a fix for the problem (plus piles of other fixes).

    --
    $jhi++; # http://www.iki.fi/jhi/
    # There is this special biologist word we use for 'stable'.
    # It is 'dead'. -- Jack Cohen
  • Jarkko Hietaniemi at Aug 4, 2000 at 12:38 am
    Ahem, this time a snapshot that has a chance of working:

    http://www.iki.fi/jhi/perl@6510.tgz

    --
    $jhi++; # http://www.iki.fi/jhi/
    # There is this special biologist word we use for 'stable'.
    # It is 'dead'. -- Jack Cohen
  • Lupe Christoph at Aug 4, 2000 at 7:36 am

    On Thursday, 2000-08-03 at 19:38:41 -0500, Jarkko Hietaniemi wrote:
    Ahem, this time a snapshot that has a chance of working:
    http://www.iki.fi/jhi/perl@6510.tgz
    It has. Works OK here with almost standard settings. (See below)
    I'll give it a full-bells-and-whistles-spin later. BTW, it still
    thinks SunOS 5.[78] map to Solaris 2.[78]. I'll propose a patch,
    also later. For now, I just entered the correct Solaris version
    by hand.

    Strange messages, though, during Configure:

    Creating config.sh...
    Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
    Propagating recommended variable $ccflags_largefiles...
    Propagating recommended variable $ldflags_largefiles...
    Propagating recommended variable $libswanted_largefiles...

    Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    Platform:
    osname=solaris, osvers=8, archname=i86pc-solaris
    uname='sunos alanya.lupe-christoph.de 5.8 generic i86pc i386 i86pc '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
    Compiler:
    cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release), gccosandvers=
    cppflags='-fno-strict-aliasing -I/opt/local/include/bind -I/opt/local/include'
    ccflags ='-fno-strict-aliasing -I/opt/local/include/bind -I/opt/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=y, prototype=define
    Linker and Libraries:
    ld='gcc', ldflags ='-L/opt/local/i386/lib '
    libpth=/opt/local/i386/lib /usr/ccs/lib /usr/lib
    libs=-lsocket -lbind -lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
    Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/opt/local/i386/lib'


    Characteristics of this binary (from libperl):
    Compile-time options: USE_LARGE_FILES
    Built under solaris
    Compiled at Aug 4 2000 08:21:00
    @INC:
    /opt/local/i386/perl@6510/lib/5.6.0/i86pc-solaris
    /opt/local/i386/perl@6510/lib/5.6.0
    /opt/local/i386/perl@6510/lib/site_perl/5.6.0/i86pc-solaris
    /opt/local/i386/perl@6510/lib/site_perl/5.6.0
    /opt/local/i386/perl@6510/lib/site_perl
    .

    Lupe Christoph
    --
    lupe@lupe-christoph.de | http://free.prohosting.com/~lupe |
    "jryy vg ybbxf yvxr gur l2x oht qvqa'g erne vg'f htyl urnq." "lrc. gur |
    qbbzfnlref unir orra cebira jebat lrg ntnva." .... "qvq lbh frr gung |
    gbb?" "ubhfgba. jr unir n ceboyrz." User Friendly 2000-01-01 |
  • Jarkko Hietaniemi at Aug 4, 2000 at 12:07 pm

    On Fri, Aug 04, 2000 at 09:15:50AM +0200, Lupe Christoph wrote:
    On Thursday, 2000-08-03 at 19:38:41 -0500, Jarkko Hietaniemi wrote:
    Ahem, this time a snapshot that has a chance of working:
    http://www.iki.fi/jhi/perl@6510.tgz
    It has. Works OK here with almost standard settings. (See below) Great.
    I'll give it a full-bells-and-whistles-spin later. BTW, it still
    thinks SunOS 5.[78] map to Solaris 2.[78]. I'll propose a patch,
    Color me stupid but I still don't get it why people find this
    problematic. Perl doesn't go around patching your kernel to output
    2.[78] or anything..
    also later. For now, I just entered the correct Solaris version
    by hand.

    Strange messages, though, during Configure:

    Creating config.sh...
    Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
    Propagating recommended variable $ccflags_largefiles...
    Propagating recommended variable $ldflags_largefiles...
    Propagating recommended variable $libswanted_largefiles...
    Configure now stashes these away for later use. But I can see
    why this may be alarming since Configure didn't use to mumble
    about such things at this point.
    Compiler:
    cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release), gccosandvers=
    Bleagh. Why does gcc not always reveal under which os release it was built?

    --
    $jhi++; # http://www.iki.fi/jhi/
    # There is this special biologist word we use for 'stable'.
    # It is 'dead'. -- Jack Cohen
  • Lupe Christoph at Aug 4, 2000 at 3:36 pm

    On Friday, 2000-08-04 at 07:07:36 -0500, Jarkko Hietaniemi wrote:
    On Fri, Aug 04, 2000 at 09:15:50AM +0200, Lupe Christoph wrote:

    I'll give it a full-bells-and-whistles-spin later. BTW, it still
    thinks SunOS 5.[78] map to Solaris 2.[78]. I'll propose a patch,
    Color me stupid but I still don't get it why people find this
    problematic. Perl doesn't go around patching your kernel to output
    2.[78] or anything..
    I did support for several computer companies in prior lives. It's
    hard to think the way some people do. It hurts.

    You hear jokes about people you punch a floppy and put it
    in a folder? Who send you a *photo*copy of a floppy? Who
    do not remove a (5.25") floppy before they put the second
    one in? Collegues and I had all this.

    I've become very careful in trying to avoid stupid support calls.
    also later. For now, I just entered the correct Solaris version
    by hand.
    Strange messages, though, during Configure:
    Creating config.sh...
    Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
    Propagating recommended variable $ccflags_largefiles...
    Propagating recommended variable $ldflags_largefiles...
    Propagating recommended variable $libswanted_largefiles...
    Configure now stashes these away for later use. But I can see
    why this may be alarming since Configure didn't use to mumble
    about such things at this point.
    No, it's because it says "*You* had some extra variables *I* don't know about."
    And I just ran Configure...
    Compiler:
    cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release), gccosandvers=
    Bleagh. Why does gcc not always reveal under which os release it was built?
    Because it doesn't know? ;-)

    There was also this (I saw it when I started the next Configure for
    the 64 bit whistles):

    Checking for GNU cc in disguise and/or its version number...
    You are using GNU cc 2.95.2 19991024 (release).
    sed: command garbled: s!.*/[^-]*-[^-]*-\([^/]*\)/2.95.2

    Lupe
    --
    lupe@lupe-christoph.de | http://free.prohosting.com/~lupe |
    "jryy vg ybbxf yvxr gur l2x oht qvqa'g erne vg'f htyl urnq." "lrc. gur |
    qbbzfnlref unir orra cebira jebat lrg ntnva." .... "qvq lbh frr gung |
    gbb?" "ubhfgba. jr unir n ceboyrz." User Friendly 2000-01-01 |
  • Dominic Dunlop at Aug 4, 2000 at 6:41 pm

    At 17:34 +0200 2000-08-04, Lupe Christoph wrote:
    Configure now stashes these away for later use. But I can see
    why this may be alarming since Configure didn't use to mumble
    about such things at this point.
    No, it's because it says "*You* had some extra variables *I* don't
    know about."
    And I just ran Configure...
    A (none-too-good) palliative is to have the hints file tell the user
    that the messages will appear later, and that they're to pay them no
    heed. A few hints files already do this. The reason that this is
    not a good band-aid is that the user is likely to have forgotten
    about the soothing message by the time the worrying ones appear.
    --
    Dominic Dunlop
  • Jarkko Hietaniemi at Aug 4, 2000 at 9:24 pm

    On Fri, Aug 04, 2000 at 05:34:39PM +0200, Lupe Christoph wrote:
    No, it's because it says "*You* had some extra variables *I* don't know about."
    And I just ran Configure...
    Yes, *you* :-) Now Configure should know about them.
    Checking for GNU cc in disguise and/or its version number...
    You are using GNU cc 2.95.2 19991024 (release).
    sed: command garbled: s!.*/[^-]*-[^-]*-\([^/]*\)/2.95.2
    Configure should now be more robust on that, too.

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedAug 3, '00 at 7:12p
activeAug 4, '00 at 9:24p
posts8
users4
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase