develooper Front page | perl.perl5.porters | Postings from November 2000

[ID 20001121.004] length($a) is incorrect after read(FFF,$a,3,100)

Thread Next
From:
Ramana V Mokkapati
Date:
November 21, 2000 08:06
Subject:
[ID 20001121.004] length($a) is incorrect after read(FFF,$a,3,100)
Message ID:
200011211606.KAA03929@stealth.switch.rockwell.com

This is a bug report for perl from mvramana@stan.switch.rockwell.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.


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

When a file is read at offset other than zero, the length of the
read string is incorrect.


open(FFF,"mmm") || die;

$r=read(FFF,$mvr,3,$ARGV[0]);

$xyz = $mvr;

print <<EOF;

Read = $r

Size of \$mvr = ${\length($mvr)}
Size of \$xyz = ${\length($xyz)}

EOF

print "-->", $mvr, "<--\n";
print "-->", $xyz, "<--\n";



[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl v5.6.0:

Configured by mvramana at Wed Sep 13 10:52:09 CDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos stan 5.6 generic_105181-13 sun4u sparc sunw,ultra-4 '
    config_args='-Dprefix=/home/mis/mvramana/stan'
    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.8.1
    cppflags='-I/usr/local/include'
    ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    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
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -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/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.6.0:
    /home/mis/mvramana/stan/lib/perl5/5.6.0/sun4-solaris
    /home/mis/mvramana/stan/lib/perl5/5.6.0
    /home/mis/mvramana/stan/lib/perl5/site_perl/5.6.0/sun4-solaris
    /home/mis/mvramana/stan/lib/perl5/site_perl/5.6.0
    /home/mis/mvramana/stan/lib/perl5/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/home/mis/mvramana
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/ucblib:/usr/openwin/lib:/usr/dt/lib:/u01/app/oracle/product/7.3.4/lib:/export/mvr/iPlanet/serverfarm/bin/https/lib
    LOGDIR (unset)
    PATH=.:/home/mis/mvramana/stan/bin:/export/mvr/j2/j2ee/j2sdk1_3_0/bin:/home/mis/mvramana/local/gprolog/gprolog-1.2.1/bin:/home/mis/mvramana/local/perl/bin:/home/mis/mvramana/local/apache/bin:/home/mis/mvramana/local/ssl/bin:/home/mis/mvramana/local/curl/bin:/home/mis/mvramana/local/mysql/bin:/home/mis/mvramana/local/bzip/bin:/home/mis/mvramana/local/htmldoc/bin:/home/mis/mvramana/local//bin:/usr/local/bin:/bin:/usr/lib:/usr/dt/bin:/usr/openwin/bin:/usr/bin:/usr/ccs/bin:/home/mis/mvramana/bin:/fcs/bin/:/usr/sbin:/u01/app/oracle/local/bin:/u01/app/oracle/product/7.3.4/bin:/u14/appl/10.7/fnd/6.1.1/bin:/u14/appl/10.7/ad/2.3.19/bin:/opt/SUNWspro/bin:/usr/ucb:/export/mvr/js/rc2/js/src/SunOS5.7_DBG.OBJ:/export/mvr/iPlanet/serverfarm/bin/https/bin
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/tcsh


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About