Taint shmread().
[p5sagit/p5-mst-13.2.git] / pod / perldelta.pod
index 2c4c9a7..52a6fba 100644 (file)
@@ -206,6 +206,18 @@ will produce different results on platforms that have different
 $Config{ivsize}.  For portability, be sure to mask off the excess bits
 in the result of unary C<~>, e.g., C<~$x & 0xffffffff>.
 
+=head2 The passwd and shell returned by the getpwxxx() are now tainted
+
+Because the user can affect her own encrypted password and login shell
+the password and shell returned by the getpwent(), getpwnam(), and
+getpwuid() functions are tainted.
+
+=head2 The shmread() now taints its variable
+
+Because other (untrusted) processes can modify shared memory segments
+for their own nefarious purposes, the variable modified by shmread()
+becomes tainted.
+
 =back
 
 =head2 C Source Incompatibilities
@@ -535,7 +547,7 @@ See L<perldata/"Scalar value constructors"> for additional information.
 
 =head2 Weak references
 
-    WARNING: This is an experimental feature.
+    WARNING: This is an experimental feature.  Details are subject to change.  
 
 In previous versions of Perl, you couldn't cache objects so as
 to allow them to be deleted if the last reference from outside 
@@ -649,9 +661,13 @@ of the traditional two-argument form.  See L<perlfunc/open>.
     NOTE: The Configure flags -Duselonglong and -Duse64bits have been
     deprecated.  Use -Duse64bitint instead.
 
-Any platform that has 64-bit integers either (a) natively as longs or
-ints (b) via special compiler flags, or (c) using long long are able to
-use "quads" (64-bit integers) as follows:
+Any platform that has 64-bit integers either
+
+       (1) natively as longs or ints
+       (2) via special compiler flags
+       (3) using long long or int64_t
+
+are able to use "quads" (64-bit integers) as follows:
 
 =over 4
 
@@ -697,21 +713,28 @@ and compile Perl using the -Duse64bitint Configure flag.
 There are actually two modes of 64-bitness: the first one is achieved
 using Configure -Duse64bitint and the second one using Configure
 -Duse64bitall.  The difference is that the first one is minimal and
-the second one maximal.  The first one does only as much as is
-required to get 64-bit integers into Perl (this may mean, for example,
-using "long longs") while your memory may still be limited to 2
-gigabytes (because your pointers are still allowed to be 32-bit); the
-second one goes all the way by attempting to switch also longs (and
-pointers) to being 64-bit.  This may create an even more binary
-incompatible Perl than -Duse64bitint: the resulting executable may not
-run at all in a 32-bit box, or you may have to reboot/reconfigure/rebuild
-your operating system to be 64-bit aware.
+the second one maximal.
+
+The C<use64bitint> does only as much as is required to get 64-bit
+integers into Perl (this may mean, for example, using "long longs")
+while your memory may still be limited to 2 gigabytes (because your
+pointers could still be 32-bit).  Note that the name C<64bitint> does
+not imply that your C compiler will be using 64-bit C<int>s (it might,
+but it doesn't have to): the C<use64bitint> means that you will be
+able to have 64 bits wide scalar values.
+
+The C<use64bitall> goes all the way by attempting to switch also
+integers (if it can), longs (and pointers) to being 64-bit.  This may
+create an even more binary incompatible Perl than -Duse64bitint: the
+resulting executable may not run at all in a 32-bit box, or you may
+have to reboot/reconfigure/rebuild your operating system to be 64-bit
+aware.
 
 Natively 64-bit systems like Alpha and Cray need neither -Duse64bitint
 nor -Duse64bitall.
 
 Last but not least: note that due to Perl's habit of always using
-floating point numbers the quads are still not true integers.
+floating point numbers, the quads are still not true integers.
 When quads overflow their limits (0...18_446_744_073_709_551_615 unsigned,
 -9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they
 are silently promoted to floating point numbers, after which they will
@@ -721,10 +744,15 @@ start losing precision (in their lower digits).
 
 If you have filesystems that support "large files" (files larger than
 2 gigabytes), you may now also be able to create and access them from
-Perl.  You have to use Configure -Duselargefiles.  Turning on the
-large file support also turns on 64-bit support on many platforms.
-Beware that unless your filesystem also supports "sparse files" seeking
-to umpteen petabytes may be unadvisable.
+Perl.  NOTE: the default action is to use the large file support, if
+available on the platform.
+
+If the large file support is on, and you have a Fcntl constant
+O_LARGEFILE, the O_LARGEFILE is automatically added to the flags
+of sysopen().
+
+Beware: unless your filesystem also supports "sparse files" seeking to
+umpteen petabytes may be unadvisable.
 
 Note that in addition to requiring a proper file system to do large
 files you may also need to adjust your per-process (or your
@@ -1144,6 +1172,19 @@ Unrecognized alphabetic escapes encountered when parsing quote
 constructs now generate a warning, since they may take on new
 semantics in later versions of Perl.
 
+Many diagnostics now report the internal operation in which the warning
+was provoked, like so:
+
+    Use of uninitialized value in concatenation (.) at (eval 1) line 1.
+    Use of uninitialized value in print at (eval 1) line 1.
+
+Diagnostics  that occur within eval may also report the file and line
+number where the eval is located, in addition to the eval sequence
+number and the line number within the evaluated text itself.  For
+example:
+
+    Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF
+
 =head1 Performance enhancements
 
 =head2 Simple sort() using { $a <=> $b } and the like are optimized
@@ -1489,15 +1530,14 @@ variables.
 =item Fcntl
 
 More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
-large file (more than 4GB) access Note that the O_LARGEFILE is
-automatically/transparently added to sysopen() flags if large file
-support has been configured), Free/Net/OpenBSD locking behaviour flags
-F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined mask of
-O_RDONLY, O_WRONLY, and O_RDWR.  The seek()/sysseek() constants
-SEEK_SET, SEEK_CUR, and SEEK_END are available via the C<:seek> tag.
-The chmod()/stat() S_IF* constants and S_IS* functions are available
-via the C<:mode> tag.
-
+large file (more than 4GB) access (NOTE: the O_LARGEFILE is
+automatically added to sysopen() flags if large file support has been
+configured, as is the default), Free/Net/OpenBSD locking behaviour
+flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined
+mask of O_RDONLY, O_WRONLY, and O_RDWR.  The seek()/sysseek()
+constants SEEK_SET, SEEK_CUR, and SEEK_END are available via the
+C<:seek> tag.  The chmod()/stat() S_IF* constants and S_IS* functions
+are available via the C<:mode> tag.
 
 =item File::Compare
 
@@ -1843,6 +1883,26 @@ optimized C backend.
 
 Support for non-Unix platforms has been improved.
 
+=head2 perldoc
+
+C<perldoc> has been reworked to avoid possible security holes.
+It will not by default let itself be run as the superuser, but you
+may still use the B<-U> switch to try to make it drop privileges
+first.
+
+=head2 The Perl Debugger
+
+Many bug fixes and enhancements were added to F<perl5db.pl>, the
+Perl debugger.  The help documentation was rearranged.  New commands
+include C<< < ? >>, C<< > ? >>, and C<< { ? >> to list out current
+actions, C<man I<docpage>> to run your doc viewer on some perl
+docset, and support for quoted options.  The help information was
+rearranged, and should be viewable once again if you're using B<less>
+as your pager.  A serious security hole was plugged--you should
+immediately remove all older versions of the Perl debugger as
+installed in previous releases, all the way back to perl3, from
+your system to avoid being bitten by this.
+
 =head1 Documentation Changes
 
 =over 4
@@ -1855,6 +1915,21 @@ The official list of public Perl API functions.
 
 An introduction to using the Perl Compiler suite.
 
+=item perldebug.pod
+
+All material unrelated to running the Perl debugger, plus all
+low-level guts-like details that risked crushing the casual user
+of the debugger, have been relocated from the old manpage to the
+next entry below.
+
+=item perldebguts.pod
+
+This new manpage contains excessively low-level material not related
+to the Perl debugger, but slightly related to debugging Perl itself.
+It also contains some arcane internal details of how the debugging
+process works that may only be of interest to developers of Perl
+debuggers.
+
 =item perlfilter.pod
 
 An introduction to writing Perl source filters.
@@ -2152,6 +2227,10 @@ corresponding bit of $^H as well.
 (F) Compile-time-substitutions (such as overloaded constants and
 character names) were not correctly set up.
 
+=item CORE::%s is not a keyword
+
+(F) The CORE:: namespace is reserved for Perl keywords.
+
 =item defined(@array) is deprecated
 
 (D) defined() is not usually useful on arrays because it checks for an
@@ -2376,6 +2455,25 @@ Remember that "my", "our", and "local" bind tighter than comma.
 (W) You are concatenating the number 19 with another number, which
 could be a potential Year 2000 problem.
 
+=item pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead
+
+(W) You have written somehing like this:
+
+    sub doit
+    {
+        use attrs qw(locked);
+    }
+
+You should use the new declaration syntax instead.
+
+    sub doit : locked
+    {
+        ...
+
+The C<use attrs> pragma is now obsolete, and is only provided for
+backward-compatibility. See L<perlsub/"Subroutine Attributes">.
+
+
 =item Premature end of script headers
 
 See Server error.
@@ -2541,6 +2639,70 @@ warning.  And in Perl 5.005, this special treatment will cease.
 
 =back
 
+=head1 Known Problems
+
+=head2 Thread tests failing
+
+The subtests 19 and 20 of the lib/thread test are known to fail in
+many platforms.
+
+=head2 EBCDIC platforms not supported
+
+In earlier releases of Perl the EBCDIC environments like OS390 (also
+known as Open Edition MVS) and VM-ESA were supported.  Due to the
+changes required by the UTF-8 (Unicode) support in Perl 5.6 the EBCDIC
+platforms are not supported in Perl 5.6.0.
+
+=head2 NEXTSTEP 3.3 POSIX test failure
+
+In NEXTSTEP 3.3p2 the implementation of the strftime(3) in the
+operating system libraries is buggy: the %j format numbers the days of
+a month starting from zero, which, while being logical to programmers,
+will cause the subtests 19 to 27 of the lib/posix test may fail.
+
+=head2 UNICOS/mk CC failures during Configure run
+
+In UNICOS/mk the following errors may appear during the Configure run:
+
+       Guessing which symbols your C compiler and preprocessor define...
+       CC-20 cc: ERROR File = try.c, Line = 3
+       ...
+         bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
+       ...
+       4 errors detected in the compilation of "try.c".
+
+The culprit is the broken awk of UNICOS/mk.  The effect is fortunately
+rather mild: Perl itself is not adversely affected by the error, only
+the h2ph utility coming with Perl, and that is rather rarely needed
+these days.
+
+=head2 Many features still experimental
+
+As discussed above, many features are still experimental, to a greater
+or lesser degree.  Interfaces and implementation are subject to
+change, in extreme cases even subject to removal in some future
+release of Perl.  These features include the following:
+
+=over 4
+
+=item Threads
+
+=item Unicode
+
+=item Lvalue subroutines
+
+=item Weak references
+
+=item File globbing now implemented internally
+
+=item The Compiler suite
+
+=item the DB module
+
+=item the regular expression constructs C<(?{ code })> and C<(??{ code })>
+
+=back
+
 =head1 BUGS
 
 If you find what you think is a bug, you might check the