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

pos $test as lvalue if test has 8-bit chars #366

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

pos $test as lvalue if test has 8-bit chars #366

p5pRT opened this issue Aug 10, 1999 · 3 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Aug 10, 1999

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

Searchable as RT1200$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 10, 1999

From goevert@amaunet.cs.uni-dortmund.de

% perl -de 1

Loading DB routines from perl5db.pl version 1.0402
Emacs support available.

Enter h or `h h' for help.

main​::(-e​:1)​: 1
  DB<1> $test = 'ä '

  DB<2> pos $test = 1

  DB<3> x pos $test
0 3
  DB<4>

Perl Info


Site configuration information for perl 5.00560:

Configured by goevert at Mon Aug  9 12:28:43 MET DST 1999.

Summary of my perl5 (revision 5.0 version 5 subversion 60) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos marcy 5.6 generic_105181-15 sun4u sparc sunw,ultra-1 '
    config_args='-der -Dcc=gcc -Doptimize=-O3 -Dprefix=/app/unido-i06/sun4_56/lang/perl/5.005_60 -Dloclibpth=/app/unido-inf/sun4_55/gdbm/1.7.3/lib     /app/unido-i06/sun4_56/db/db/new/lib     /app/unido-i06/sun4_56/db/wais/new/lib /app/unido-i06/sun4_56/util/zlib/new/lib -Dlocincpth=/app/unido-inf/sun4_55/gdbm/1.7.3/include /app/unido-i06/sun4_56/db/db/new/include /app/unido-i06/sun4_56/db/wais/new/lib /app/unido-i06/sun4_56/util/zlib/new/include -Darchlib=/app/unido-i06/sun4_56/lang/perl/5.005_60/lib -Dprivlib=/app/unido-i06/sun4_56/lang/perl/5.005_60/lib -Dsitelib=/app/unido-i06/sun4_56/lang/perl/5.005_60/lib/site-perl -Dsitearch=/app/unido-i06/sun4_56/lang/perl/5.005_60/lib/site-perl -Dmydomain=.cs.uni-dortmund.de -Dcf_email=goevert@ls6.cs.uni-dortmund.de -Dperladmin=goevert@ls6.cs.uni-dortmund.de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    use64bits=undef usemultiplicity=undef
  Compiler:
    cc='gcc', optimize='-O3', gccversion=2.7.2.3.f.1
    cppflags='-I/app/unido-inf/sun4_55/gdbm/1.7.3/include -I/app/unido-i06/sun4_56/db/db/new/include -I/app/unido-i06/sun4_56/db/wais/new/lib -I/app/unido-i06/sun4_56/util/zlib/new/include'
    ccflags ='-I/app/unido-inf/sun4_55/gdbm/1.7.3/include -I/app/unido-i06/sun4_56/db/db/new/include -I/app/unido-i06/sun4_56/db/wais/new/lib -I/app/unido-i06/sun4_56/util/zlib/new/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=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/app/unido-inf/sun4_55/gdbm/1.7.3/lib -L/app/unido-i06/sun4_56/db/db/new/lib -L/app/unido-i06/sun4_56/db/wais/new/lib -L/app/unido-i06/sun4_56/util/zlib/new/lib'
    libpth=/app/unido-inf/sun4_55/gdbm/1.7.3/lib /app/unido-i06/sun4_56/db/db/new/lib /app/unido-i06/sun4_56/db/wais/new/lib /app/unido-i06/sun4_56/util/zlib/new/lib /lib /usr/lib /usr/ccs/lib /usr/local/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lsec
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/app/unido-inf/sun4_55/gdbm/1.7.3/lib -L/app/unido-i06/sun4_56/db/db/new/lib -L/app/unido-i06/sun4_56/db/wais/new/lib -L/app/unido-i06/sun4_56/util/zlib/new/lib'

Locally applied patches:
    


@INC for perl 5.00560:
    /app/unido-inf/sun4_55/stdenv/96a-extra/lib/titrax
    /app/unido-i06/sun4_56/lang/perl/5.005_60/lib
    /app/unido-i06/sun4_56/lang/perl/5.005_60/lib/site-perl
    /app/unido-i06/sun4_56/lang/perl/5.005_60/lib/site_perl
    .


Environment for perl 5.00560:
    HOME=/home-local/goevert
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/app/unido-inf/sun4_55/libxpm/3.4h/lib
    LOGDIR (unset)
    PATH=/home-local/goevert/bin:/home-local/goevert/bin/sun4-solaris:/app/unido-i06/sun4_56/gui/xtea/1.3/bin:/app/unido-i06/sun4_56/text/gv/3.5.8/bin:/app/unido-i06/sun4_56/gui/xmultibiff/2.2/bin:/app/unido-i06/sun4_56/lang/perl/5.005_54/bin:/app/unido-i06/sun4_56/edit/emacs/20.4/bin:/app/unido-i06/sun4_56/util/fileutils/4.0/bin:/app/unido-i06/sun4_56/adm/script/1.0/bin:/app/unido-i06/sun4_56/stdenv/default/bin:/app/unido-inf/sun4_55/psutils/1.17/bin:/app/unido-inf/sun4_55/gnuplot/3.7/bin:/app/unido-inf/sun4_55/rsync/2.0.16/bin:/app/unido-inf/sun4_55/acroread/4.0/bin:/app/unido-inf/sun4_55/acrobat/3.0/bin:/app/unido-inf/sun4_55/cvs/1.9.28/bin:/app/unido-inf/sun4_55/prcs/1.2.3/bin:/app/unido-inf/sun4_55/netscape/4.6:/app/unido-inf/sun4_55/aktex/1999_04_16/bin:/app/unido-inf/sun4_55/pgp/263is/bin:/app/unido-inf/sun4_55/metamail/2.7/bin:/app/unido-inf/sun4_55/transfig/3.2.1/bin:/app/unido-inf/sun4_55/xfig/3.2.2/bin:/app/unido-inf/sun4_55/ispell/3.1.20/bin:/app/unido-inf/sun4_55/!
patch/2.5/bin:/app/unido-inf/sun4_55/groff/1.10/bin:/app/unido-inf/sun4_55/stdenv/96a-extra/bin:/app/unido-inf/sun4_55/gnudevenv/1998_03_27/bin:/app/unido-inf/sun4_55/graphicenv/96a/bin:/app/unido-inf/sun4_55/stdenv/96a/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ccs/bin:/bin:/usr/bin:/usr/sbin:/usr/openwin/demo:/opt/local/bin:.
    PERLLIB=/app/unido-inf/sun4_55/stdenv/96a-extra/lib/titrax
    PERL_BADLANG (unset)
    SHELL=/opt/local/bin/bash

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 10, 1999

From [Unknown Contact. See original ticket]

Norbert Goevert writes​:

DB<1> $test = 'ä '

DB<2> pos $test = 1

DB<3> x pos $test
0 3

Site configuration information for perl 5.00560​:

Confirmed. Just to make it more reproducible​:

  DB<1> O H
  HighBit = '1'
  DB<2> x 'ä '
0 '\344 '

Ilya

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Aug 10, 1999

From @jhi

Ilya Zakharevich writes​:

Norbert Goevert writes​:

DB<1> $test = 'ä '

DB<2> pos $test = 1

DB<3> x pos $test
0 3

Site configuration information for perl 5.00560​:

Confirmed. Just to make it more reproducible​:

DB<1> O H
HighBit = '1'
DB<2> x 'ä '
0 '\344 '

Confirmed also here. The pos seems to become the length of the string,
for example​:

$ perl -le '$s="abcd\377efgh\377";pos $s = 4;print pos $s'
4
$ perl -le '$s="abcd\377efgh\377";pos $s = 5;print pos $s'
10
$ perl -le '$s="abcd\377efgh\377";pos $s = 6;print pos $s'
10

Note also that what seems to trigger the bug is to try to pos()
*after* an eight-bit character, not *at* such a character.

--
$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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.