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

map { while (1) } hangs perl during compilation #416

Closed
p5pRT opened this issue Aug 22, 1999 · 7 comments
Closed

map { while (1) } hangs perl during compilation #416

p5pRT opened this issue Aug 22, 1999 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 22, 1999

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

Searchable as RT1251$

@p5pRT
Copy link
Author

p5pRT commented Aug 22, 1999

From barries@slaysys.com

This​:

  sub foo {
  map {
  while (1) {} ;
  } @​wits_end ;
  }

  BEGIN {
  die ;
  }

Never dies. It sucks up all CPU instead.

This​:

  sub foo1 {
  map {
  ;
  } @​wits_end ;
  }

  sub foo2 {
  map {
  while ($i) {}
  } @​wits_end ;
  }

  die ;

dies nicely. Haven't checked under _60 (let alone _61).

"Do not go gently into that dark night...."

Perl Info


Site configuration information for perl 5.00503:

Configured by root at Fri May 28 10:03:51 EDT 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.2.9, archname=i686-linux
    uname='linux jester.slaysys.com 2.2.9 #4 smp thu may 27 10:44:27 edt 1999 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    cppflags='-Dbool=char -DHAS_BOOL'
    ccflags ='-Dbool=char -DHAS_BOOL'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00503:
    /home/barries/src/Safari/lib
    /usr/lib/perl5/5.00503/i686-linux
    /usr/lib/perl5/5.00503
    /usr/lib/perl5/site_perl/5.005/i686-linux
    /usr/lib/perl5/site_perl/5.005
    .


Environment for perl 5.00503:
    HOME=/home/barries
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:~/bin:~/bin
    PERL5LIB=/home/barries/src/Safari/lib
    PERLDB_OPTS=AutoTrace
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Aug 24, 1999

From [Unknown Contact. See original ticket]

On Sun, 22 Aug 1999 at 23​:38​:17 -0400, Barrie Slaymaker wrote​:

sub foo {
map {
while (1) {} ;
} @​wits_end ;
}

BEGIN {
die ;
}

Never dies. It sucks up all CPU instead.

A progress report​:

I took a peek with gdb, and it's stuck in Perl_ck_grep running round a
small circular list of items
  pp_nextstate->pp_stub->pp_unstack

We need to see where that came from... fold_constants getting confused?

Ian

@p5pRT
Copy link
Author

p5pRT commented Feb 19, 2002

From The RT System itself

map { while (1) {} } ();
BEGIN { die "ok 1" }

@p5pRT
Copy link
Author

p5pRT commented Jul 6, 2003

From @floatingatoll

[RT_System - Tue Aug 24 07​:29​:00 1999]​:

On Sun, 22 Aug 1999 at 23​:38​:17 -0400, Barrie Slaymaker wrote​:

sub foo {
map {
while (1) {} ;
} @​wits_end ;
}

BEGIN {
die ;
}

Never dies. It sucks up all CPU instead.

This bug is still present, as of the current development version of perl (@​18374).

(gdb) bt
#0 0x00015c64 in Perl_ck_grep ()
#1 0x0000d418 in Perl_convert ()
#2 0x000c79ac in Perl_yyparse ()
#3 0x0001b818 in S_parse_body ()
#4 0x0001a77c in perl_parse ()

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2003

From @schwern

Bug still present in 5.8.1 RC 2

@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2004

From @rspier

not fixed in 5.8.4
will be fixed in 5.9.2 (DEVEL22511)

@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2004

@rspier - Status changed from 'open' to 'resolved'

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