summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-02-15 22:31:23 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-02-15 22:31:23 -0800
commit12605ff99dc0b98fd730bbd2380934b87b8b32f5 (patch)
tree5e09993cf6bea20b2c35d09cb467fedb225bd5bd
parent962bcf2846ff67ac4c58856ea567b5bf0e9fb52e (diff)
downloadperl-12605ff99dc0b98fd730bbd2380934b87b8b32f5.tar.gz
add refcnt_inc/dec to perldiag
-rw-r--r--perlio.c5
-rw-r--r--pod/perldiag.pod4
-rw-r--r--t/porting/diag.t5
3 files changed, 9 insertions, 5 deletions
diff --git a/perlio.c b/perlio.c
index 6a092d0b93..42bdb849b4 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2412,6 +2412,7 @@ PerlIOUnix_refcnt_inc(int fd)
PL_perlio_fd_refcnt[fd]++;
if (PL_perlio_fd_refcnt[fd] <= 0) {
+ /* diag_listed_as: refcnt_inc: fd %d%s */
Perl_croak(aTHX_ "refcnt_inc: fd %d: %d <= 0\n",
fd, PL_perlio_fd_refcnt[fd]);
}
@@ -2422,6 +2423,7 @@ PerlIOUnix_refcnt_inc(int fd)
MUTEX_UNLOCK(&PL_perlio_mutex);
#endif
} else {
+ /* diag_listed_as: refcnt_inc: fd %d%s */
Perl_croak(aTHX_ "refcnt_inc: fd %d < 0\n", fd);
}
}
@@ -2437,10 +2439,12 @@ PerlIOUnix_refcnt_dec(int fd)
MUTEX_LOCK(&PL_perlio_mutex);
#endif
if (fd >= PL_perlio_fd_refcnt_size) {
+ /* diag_listed_as: refcnt_dec: fd %d%s */
Perl_croak(aTHX_ "refcnt_dec: fd %d >= refcnt_size %d\n",
fd, PL_perlio_fd_refcnt_size);
}
if (PL_perlio_fd_refcnt[fd] <= 0) {
+ /* diag_listed_as: refcnt_dec: fd %d%s */
Perl_croak(aTHX_ "refcnt_dec: fd %d: %d <= 0\n",
fd, PL_perlio_fd_refcnt[fd]);
}
@@ -2450,6 +2454,7 @@ PerlIOUnix_refcnt_dec(int fd)
MUTEX_UNLOCK(&PL_perlio_mutex);
#endif
} else {
+ /* diag_listed_as: refcnt_dec: fd %d%s */
Perl_croak(aTHX_ "refcnt_dec: fd %d < 0\n", fd);
}
return cnt;
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 087f90682a..0187cbcc41 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -3906,8 +3906,12 @@ which is why it's currently left out of your copy.
believes it found an infinite loop in the C<@ISA> hierarchy. This is a
crude check that bails out after 100 levels of C<@ISA> depth.
+=item refcnt_dec: fd %d%s
+
=item refcnt: fd %d%s
+=item refcnt_inc: fd %d%s
+
(P) Perl's I/O implementation failed an internal consistency check. If
you see this message, something is very wrong.
diff --git a/t/porting/diag.t b/t/porting/diag.t
index f001d94ed1..cc93874e38 100644
--- a/t/porting/diag.t
+++ b/t/porting/diag.t
@@ -459,11 +459,6 @@ Perls since %s too modern--this is %s, stopped
ptr wrong %p != %p fl=%x nl=%p e=%p for %d
Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?)
Recursive call to Perl_load_module in PerlIO_find_layer
-refcnt_dec: fd %d < 0
-refcnt_dec: fd %d: %d <= 0
-refcnt_dec: fd %d >= refcnt_size %d
-refcnt_inc: fd %d < 0
-refcnt_inc: fd %d: %d <= 0
Reversed %c= operator
Runaway prototype
%s(%.0