b2938d
From cac138107138a9814b32c4de74426225628f1646 Mon Sep 17 00:00:00 2001
b2938d
From: Karl Williamson <khw@cpan.org>
b2938d
Date: Sun, 17 Jan 2021 21:45:20 -0700
b2938d
Subject: [PATCH] Add missing entries to perldiag; GH #18276
b2938d
MIME-Version: 1.0
b2938d
Content-Type: text/plain; charset=UTF-8
b2938d
Content-Transfer-Encoding: 8bit
b2938d
b2938d
The ticket mentions yet another message, not addressed in this
b2938d
commit, "Insecure private-use override".  That message is part of a
b2938d
hook for a so-far unimplemented module, so it actually doesn't ever get
b2938d
raised.
b2938d
b2938d
Committer: One correction per Grinnz comment in
b2938d
https://github.com/Perl/perl5/pull/18491
b2938d
Signed-off-by: Petr Písař <ppisar@redhat.com>
b2938d
---
b2938d
 pod/perldiag.pod | 45 +++++++++++++++++++++++++++++++++++++++++++++
b2938d
 1 file changed, 45 insertions(+)
b2938d
b2938d
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
b2938d
index 9c91630d39..63f57f220e 100644
b2938d
--- a/pod/perldiag.pod
b2938d
+++ b/pod/perldiag.pod
b2938d
@@ -2195,6 +2195,20 @@ single form when it must operate on them directly.  Either you've passed
b2938d
 an invalid file specification to Perl, or you've found a case the
b2938d
 conversion routines don't handle.  Drat.
b2938d
 
b2938d
+=item Error %s in expansion of %s
b2938d
+
b2938d
+(F) An error was encountered in handling a user-defined property
b2938d
+(L<perlunicode/User-Defined Character Properties>).  These are
b2938d
+programmer written subroutines, hence subject to errors that may
b2938d
+prevent them from compiling or running.  The calls to these subs are
b2938d
+C<eval>'d, and if there is a failure, this message is raised, using the
b2938d
+contents of C<$@> from the failed C<eval>.
b2938d
+
b2938d
+Another possibility is that tainted data was encountered somewhere in
b2938d
+the chain of expanding the property.  If so, the message wording will
b2938d
+indicate that this is the problem.  See L
b2938d
+property %s>.
b2938d
+
b2938d
 =item Eval-group in insecure regular expression
b2938d
 
b2938d
 (F) Perl detected tainted data when trying to compile a regular
b2938d
@@ -2836,6 +2850,16 @@ not match 8 spaces.
b2938d
 text.  You should check the pattern to ensure that recursive patterns
b2938d
 either consume text or fail.
b2938d
 
b2938d
+=item Infinite recursion in user-defined property
b2938d
+
b2938d
+(F) A user-defined property (L
b2938d
+Properties>) can depend on the definitions of other user-defined
b2938d
+properties.  If the chain of dependencies leads back to this property,
b2938d
+infinite recursion would occur, were it not for the check that raised
b2938d
+this error.
b2938d
+
b2938d
+Restructure your property definitions to avoid this.
b2938d
+
b2938d
 =item Infinite recursion via empty pattern
b2938d
 
b2938d
 (F) You tried to use the empty pattern inside of a regex code block,
b2938d
@@ -6273,6 +6297,20 @@ lexicals that are initialized only once (see L<feature>):
b2938d
 This use of C<my()> in a false conditional was deprecated beginning in
b2938d
 Perl 5.10 and became a fatal error in Perl 5.30.
b2938d
 
b2938d
+=item Timeout waiting for another thread to define \p{%s}
b2938d
+
b2938d
+(F) The first time a user-defined property
b2938d
+(L<perlunicode/User-Defined Character Properties>) is used, its
b2938d
+definition is looked up and converted into an internal form for more
b2938d
+efficient handling in subsequent uses.  There could be a race if two or
b2938d
+more threads tried to do this processing nearly simultaneously.
b2938d
+Instead, a critical section is created around this task, locking out all
b2938d
+but one thread from doing it.  This message indicates that the thread
b2938d
+that is doing the conversion is taking an unexpectedly long time.  The
b2938d
+timeout exists solely to prevent deadlock; it's long enough that the
b2938d
+system was likely thrashing and about to crash.  There is no real remedy but
b2938d
+rebooting.
b2938d
+
b2938d
 =item times not implemented
b2938d
 
b2938d
 (F) Your version of the C library apparently doesn't do times().  I
b2938d
@@ -6846,6 +6884,13 @@ for the list of known options.
b2938d
 L<perlrun|perlrun/-C [numberE<sol>list]> documentation of the C<-C> switch
b2938d
 for the list of known options.
b2938d
 
b2938d
+=item Unknown user-defined property name \p{%s}
b2938d
+
b2938d
+(F) You specified to use a property within the C<\p{...}> which was a
b2938d
+syntactically valid user-defined property, but no definition was found
b2938d
+for it by the time one was required to proceed.  Check your spelling.
b2938d
+See L<perlunicode/User-Defined Character Properties>.
b2938d
+
b2938d
 =item Unknown verb pattern '%s' in regex; marked by S<<-- HERE> in m/%s/
b2938d
 
b2938d
 (F) You either made a typo or have incorrectly put a C<*> quantifier
b2938d
-- 
b2938d
2.26.2
b2938d