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

study and //g bug? #833

Closed
p5pRT opened this issue Nov 10, 1999 · 4 comments
Closed

study and //g bug? #833

p5pRT opened this issue Nov 10, 1999 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 10, 1999

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

Searchable as RT1761$

@p5pRT
Copy link
Author

p5pRT commented Nov 10, 1999

From pak@ast.cam.ac.uk

If I run the following Perl program​:

$field="disk whi";
study $field;
print "Studied!\n";
print "Found ",++$i, " matches\n" while($field=~/disk/g);

it gets stuck in an infinite loop, whereas if I comment out the
study $field line, it works fine and just returns one match.

Perl Info


Site configuration information for perl 5.00502:

Configured by jarle at Tue Jan 12 21:32:30 BST 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos cass28 5.6 generic_105181-09 sun4u sparc sunw,ultra-1 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-I/usr/local/include -I/opt/local/include'
    ccflags ='-I/usr/local/include -I/opt/local/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=16
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib'
    libpth=/usr/local/lib /opt/local/lib /opt/gnu/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib'

Locally applied patches:
    


@INC for perl 5.00502:
    /usr/local/lib/perl5/5.00502/sun4-solaris
    /usr/local/lib/perl5/5.00502
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.005
    .


Environment for perl 5.00502:
    HOME=/home/pak
    LANG (unset)
    LD_LIBRARY_PATH=/usr/lib:/opt/X11R6/lib:/usr/local/lib:/usr/openwin/lib:/usr/ucblib
    LOGDIR (unset)
    PATH=/opt/SUNWspro/bin:/usr/bin:/usr/ucb:/usr/ccs/bin:/usr/sbin:/usr/openwin/bin:/opt/X11R6/bin:/usr/local/bin:/usr/local/teTeX/bin/current:.:/home/pak/bin
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh

@p5pRT
Copy link
Author

p5pRT commented Nov 10, 1999

From [Unknown Contact. See original ticket]

Philip Kendall writes​:

$field="disk whi";
study $field;
print "Studied!\n";
print "Found ",++$i, " matches\n" while($field=~/disk/g);

it gets stuck in an infinite loop, whereas if I comment out the
study $field line, it works fine and just returns one match.

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration​:

I do not see this with 5.005_03.

Ilya

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 1999

From [Unknown Contact. See original ticket]

Ilya Zakharevich <ilya@​math.ohio-state.edu> wrote

$field="disk whi";
study $field;
print "Studied!\n";
print "Found ",++$i, " matches\n" while($field=~/disk/g);

it gets stuck in an infinite loop, whereas if I comment out the
study $field line, it works fine and just returns one match.

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration​:

I do not see this with 5.005_03.

I see it with any of 5.005 - 5.005_03 (sample config attached).

I don't see it with any 5.004*, nor with 5.005_62.

Mike Guy

% perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration​:
  Platform​:
  osname=solaris, osvers=2.6, archname=sun4-solaris
  uname=''
  hint=previous, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  Compiler​:
  cc='gcc', optimize='-O', gccversion=2.7.2.3
  cppflags='-I/usr/local/include -I/opt/local/include -DREG_INFTY=22786'
  ccflags ='-I/usr/local/include -I/opt/local/include -DREG_INFTY=22786'
  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
  alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
  libpth=/usr/local/lib /opt/local/lib /lib /usr/lib /usr/ccs/lib
  libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
  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 -L/opt/local/lib'

Characteristics of this binary (from libperl)​:
  Locally applied patches​:
  debug.list.file
  kill.0
  list.assign
  perlfaq8.typo
  Built under solaris
  Compiled at Oct 13 1999 04​:22​:25
  @​INC​:
  /home/mjtg/perl5.005_03/lib
  /home/mjtg/perl5.005_03/lib
  /home/mjtg/perl5.005_03/lib
  .

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 1999

From [Unknown Contact. See original ticket]

M.J.T. Guy writes​:

$field="disk whi";
study $field;
print "Studied!\n";
print "Found ",++$i, " matches\n" while($field=~/disk/g);

it gets stuck in an infinite loop, whereas if I comment out the
study $field line, it works fine and just returns one match.

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration​:

I do not see this with 5.005_03.

I see it with any of 5.005 - 5.005_03 (sample config attached).

I ran it again with 5.005_03, and now it loops. (?!)

Ilya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant