develooper Front page | perl.perl5.porters | Postings from October 2002

Redhat 8 issue?

Thread Next
From:
Paul Marquess
Date:
October 30, 2002 13:35
Subject:
Redhat 8 issue?
Message ID:
AIEAJICLCBDNAAOLLOKLEEEGFMAA.Paul.Marquess@btinternet.com
I've had a few reports of the newest Compress::ZLib failing its test suite
on Redhat 8 + 5.8.0. After a bit of digging with the assistance of the first
person to report the issue, I've boiled the problem down to a piece of code
that writes a buffer containing compressed data to file & doesn't make use
of Compress::Zlib at all. The process of writing it seems to corrupt the
data. Below is a snippet of the code I've used to narrow down the problem:

my $dest =
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03\x2b\xce\xcf\x4d\x55\x28" .

"\x4e\xcc\x2d\xc8\x49\x55\xe0\x2a\x49\xad\x28\xe1\xe2\x02\x00\x07" .
           "\x51\x17\x11\x13\x00\x00\x00";

my $name = "name.bin";
unlink $name ;

open(FH, ">$name");
print FH $dest ;
close FH ;


Here is a hex dump of the data before writing to file (which is fine)

00000000    1f 8b 08 00 00 00 00 00 00 03 2b ce cf 4d 55 28
...........+..MU(
00000010    4e cc 2d c8 49 55 e0 2a 49 ad 28 e1 e2 02 00 07
N.-.IU.*I.(.....
00000020    51 17 11 13 00 00 00                              Q......

and here is a hex dump of the data read back in (which is not fine)

00000000    1f c2 8b 08 00 00 00 00 00 00 03 2b c3 8e c3 8f
............+....
00000010    4d 55 28 4e c3 8c 2d c3 88 49 55 c3 a0 2a 49 c2
MU(N..-..IU..*I.
00000020    ad 28 c3 a1 c3 a2 02 00 07 51 17 11 13 00 00 00
..(.......Q......

This smells suspiciously like a UTF-8 issue, but I can't figure out is why I
don't get the same problem on either Solaris or my own Linux box.

Does this ring a bell with anyone?

Below is the version information from one of the Redhat 8 machines.

Paul



Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.18-11smp, archname=i386-linux-thread-multi
    uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15
06:41:59 edt 2002 i686 i686 i386 gnulinux '




config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dmyhostname=localho
st -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat,
Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix
=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefi
les -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_sysl
og -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversionon
ly -Dpager=/usr/bin/less -isr'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags
='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FIL
E_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -march=i386 -mcpu=i686',




cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdb
m'
    ccversion='', gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)',
gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    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, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    libc=/lib/libc-2.2.92.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.2.92'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Sep  1 2002 23:56:49
  @INC:
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    .


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