Skip Menu |
Report information
Id: 1761
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: pak [at] ast.cam.ac.uk
Cc:
AdminCc:

Operating System: Solaris
PatchStatus: (no value)
Severity: medium
Type: library
Perl Version: 5.005_03
Fixed In: (no value)



Date: Wed, 10 Nov 1999 11:59:22 GMT
From: Philip Kendall <pak [...] ast.cam.ac.uk>
To: perlbug [...] perl.com
Subject: study and //g bug?
Download (untitled) / with headers
text/plain 2.3k
----------------------------------------------------------------- [Please enter your report here] 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. [Please do not change anything below this line] ----------------------------------------------------------------- --- 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
From: Ilya Zakharevich <ilya [...] math.ohio-state.edu>
Subject: Re: [ID 19991110.001] study and //g bug?
To: pak [...] ast.cam.ac.uk (Philip Kendall)
Date: Wed, 10 Nov 1999 18:18:46 -0500 (EST)
Cc: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 385b
Philip Kendall writes: Show quoted text
> $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.
Show quoted text
> Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
I do not see this with 5.005_03. Ilya
To: pak [...] ast.cam.ac.uk, perl5-porters [...] perl.org
Subject: Re: [ID 19991110.001] study and //g bug?
From: "M.J.T. Guy" <mjtg [...] cus.cam.ac.uk>
Date: Thu, 11 Nov 1999 17:55:17 +0000
Download (untitled) / with headers
text/plain 1.9k
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote Show quoted text
> > $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 .
From: Ilya Zakharevich <ilya [...] math.ohio-state.edu>
Subject: Re: [ID 19991110.001] study and //g bug?
To: mjtg [...] cus.cam.ac.uk (M.J.T. Guy)
Date: Thu, 11 Nov 1999 15:25:07 -0500 (EST)
Cc: pak [...] ast.cam.ac.uk, perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 549b
M.J.T. Guy writes: Show quoted text
> > > $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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org