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

File::Path 1.04 bug (all perl5 core versions) #71

p5pRT opened this issue Jun 15, 1999 · 3 comments

File::Path 1.04 bug (all perl5 core versions) #71

p5pRT opened this issue Jun 15, 1999 · 3 comments


Copy link

p5pRT commented Jun 15, 1999

Migrated from (status was 'resolved')

Searchable as RT873$

Copy link

p5pRT commented Jun 15, 1999


A bug in File​::Path caused some very serious outages here. A bug in
code which *uses* File​::Path called rmtree() with an uninitialized first
argument. Unfortunately, rmtree() behaves by defaulting to assume
that you want to remove /.

This is *bad* default behavior. The patch below will at least check
that $roots has a true value, and will return 0 otherwise.

This applies to all the existing perl releases, that include
File​::Path 1.04 or 1.0401, most importantly including all the latest
maintenance releases.

*** /ms/dist/perl5/PROJ/core/5.00503/lib/perl5/File/ Thu Apr 22 11​:52​:32 1999
--- /ms/user/w/wpm/tmp/ Tue Jun 15 17​:37​:48 1999
*** 148,157 ****
  my($roots, $verbose, $safe) = @​_;
  my($count) = 0;
- $roots = [$roots] unless ref $roots;
  $verbose ||= 0;
  $safe ||= 0;
  foreach $root (@​{$roots}) {
  $root =~ s#/$##;
--- 148,164 ----
  my($roots, $verbose, $safe) = @​_;
  my($count) = 0;
  $verbose ||= 0;
  $safe ||= 0;
+ if ( defined($roots) && length($roots) ) {
+ $roots = [$roots] unless ref $roots;
+ }
+ else {
+ carp "No root path(s) specified\n";
+ return 0;
+ }
  foreach $root (@​{$roots}) {
  $root =~ s#/$##;

This perlbug was built using Perl 5.00503 - Thu May 20 11​:43​:00 EDT 1999
It is being executed now by Perl 5.00503 - Thu May 20 11​:45​:48 EDT 1999.

Site configuration information for perl 5.00503​:

Configured by wpm at Thu May 20 11​:45​:48 EDT 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration​:
  osname=solaris, osvers=2.5.1, archname=sun4-solaris
  uname='sunos sascs1 5.5.1 generic_103640-24 sun4u sparc sunw,ultra-enterprise '
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  cc='cc', optimize='-O', gccversion=
  cppflags='-DAPPLLIB_EXP="/ms/dist/perl5/VERS/5.00503-core/lib/perl5​:/ms/dist/perl5/VERS/5.005-core/lib/perl5" -I/usr/local/include'
  ccflags ='-DAPPLLIB_EXP="/ms/dist/perl5/VERS/5.00503-core/lib/perl5​:/ms/dist/perl5/VERS/5.005-core/lib/perl5" -I/usr/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'
  libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
  libs=-lsocket -lnsl -ldb -ldl -lm -lc -lcrypt
  libc=/lib/, 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'

Locally applied patches​:

@​INC for perl 5.00503​:

Environment for perl 5.00503​:
  LANGUAGE (unset)
  LOGDIR (unset)
  PERL_BADLANG (unset)

Copy link

p5pRT commented Jul 24, 2000

From [Unknown Contact. See original ticket]

fixed in change @​2695

Copy link

p5pRT commented Nov 28, 2003

From The RT System itself

fixed in change @​2695

@p5pRT p5pRT closed this as completed Nov 28, 2003
haarg pushed a commit to haarg/perl5 that referenced this issue Oct 21, 2019
These versions need more work to get right; this commit does that.

(cherry picked from commit ebe8b7681463dd9f7a23716166a8861ce6514ae2)
Signed-off-by: Nicolas R <>
karenetheridge added a commit that referenced this issue Nov 2, 2019

5.20191102  2019-11-02 05:34:43Z
  * fix bad pod markup in perlfaq8 (PR #78; thanks, Joaquín Ferrero!)
  * remove stale section about (PR #82, Dan Book)
  * update perlfaq9 to reference Email::Stuffer (PR #79, Dan Book)
  * update perlfaq9 to reference URL::Search (PR #80, Dan Book)
  * update perlfaq9 to use HTTP::Tiny (PR #81, Dan Book)
  * fix some broken links (issue #71, dctabuyz)
khwilliamson pushed a commit to khwilliamson/perl5 that referenced this issue Jul 28, 2023
d_localtime_r.U - explicitly free() allocations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant