[Perl/perl5] 0a792b: class.c: Correct allocation of OP_ARGCHECK aux str...

2024-02-08 Thread Paul Evans via perl5-changes
  Branch: refs/heads/smoke-me/khw-env
  Home:   https://github.com/Perl/perl5
  Commit: 0a792b642405b33a660ff1c06db19f39cf7229b9
  
https://github.com/Perl/perl5/commit/0a792b642405b33a660ff1c06db19f39cf7229b9
  Author: Paul "LeoNerd" Evans 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M class.c

  Log Message:
  ---
  class.c: Correct allocation of OP_ARGCHECK aux structure

The original code was wrong on two counts:
 * Using Newx() instead of PerlMemShared_malloc()
 * Creating a generic UNOP_AUX_item array instead of the special struct
   type




[Perl/perl5] 495831: locale.c: use type-agnostic code for storing tm_zone

2024-02-08 Thread mauke via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 495831c4464a208feae5703c819caf0ead0faed0
  
https://github.com/Perl/perl5/commit/495831c4464a208feae5703c819caf0ead0faed0
  Author: Lukas Mai 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: use type-agnostic code for storing tm_zone

On some platforms, struct tm has a tm_zone member, but its type is not
consistent:

 - Linux: const char *tm_zone;
 - FreeBSD (& probably other BSDs): char *tm_zone;

In order to save/restore tm_zone, we can't just use a "const char *" or
"char *" variable because different parts of this code would always be a
const violation on one platform or the other.

Workaround: Use the tm_zone member of a full struct tm, which has the
right type no matter the platform.

Fixes #21948.




[Perl/perl5] 97bd10: lib/locale.t:

2024-02-08 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/smoke-me/khw-env
  Home:   https://github.com/Perl/perl5
  Commit: 97bd10fb57ec53f2b530fa9e518855b030360038
  
https://github.com/Perl/perl5/commit/97bd10fb57ec53f2b530fa9e518855b030360038
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M lib/locale.t

  Log Message:
  ---
  lib/locale.t:

Fixes #21697.

On some platforms, a locale name is specified in the code page (or
code set) that applies to it, rather than plain ASCII.  Windows, and
hence MingW, is the prime example.

The locale name for a particular Turkish variety found in MingW is
"Turkish_T?.1254" where the question marks represent different
characters that have meaning in the 1254 code page, but would look like
mojibake if I had reproduced their actual values here.

When doing a setlocale() here, if the current code page is incompatible
with the new one, it will fail; if compatible it will succeed.

On my box running MingW, locales are tried out by this test file in
alphabetical order, and the one before this Turkish happens to be Thai,
with a code page of 874.  Apparently 1254 is not compatible with 874, so
switching directly from Thai to Turkish fails.

The solution is to switch into a neutral code page before switching into
one being trialed.  "C" works in this case, and I suspect in all others.


  Commit: 4a6082257fe61224954d5dc9aac8f127620fd1e7
  
https://github.com/Perl/perl5/commit/4a6082257fe61224954d5dc9aac8f127620fd1e7
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M charclass_invlists.h
M lib/unicore/Makefile
M lib/unicore/mktables
M lib/unicore/uni_keywords.pl
M regcharclass.h
M uni_keywords.h

  Log Message:
  ---
  mktables more verbose


  Commit: bb7bdc6ac915d1d850e1317c3ad699c1adef2db4
  
https://github.com/Perl/perl5/commit/bb7bdc6ac915d1d850e1317c3ad699c1adef2db4
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm

  Log Message:
  ---
  BlackBox dont use rare scripts


  Commit: f57e455d9c2b8cfddc50dfd5f6625f7f5268dd5a
  
https://github.com/Perl/perl5/commit/f57e455d9c2b8cfddc50dfd5f6625f7f5268dd5a
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M t/harness

  Log Message:
  ---
  XXX t/harness temp tweaks


  Commit: ee6529a392a68d980b2866ce7d6fad64d1cf04aa
  
https://github.com/Perl/perl5/commit/ee6529a392a68d980b2866ce7d6fad64d1cf04aa
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M t/harness

  Log Message:
  ---
  XXX skip croak.t under sanitizer


  Commit: afb4ee1aa9c0550f1cf9a67e0050e40afd8a44f3
  
https://github.com/Perl/perl5/commit/afb4ee1aa9c0550f1cf9a67e0050e40afd8a44f3
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M t/porting/bincompat.t

  Log Message:
  ---
  skip bincompat.t


  Commit: 98bc22d4601bb7b6502286231b556e02154ba190
  
https://github.com/Perl/perl5/commit/98bc22d4601bb7b6502286231b556e02154ba190
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M t/TEST

  Log Message:
  ---
  Skip cpan testing message


  Commit: 2ad45e5f746d6d5ed577e3d5abafaa05ba787ffd
  
https://github.com/Perl/perl5/commit/2ad45e5f746d6d5ed577e3d5abafaa05ba787ffd
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M t/TEST

  Log Message:
  ---
  Also skip non-thread dist testing


  Commit: 4e174ff491474862136c09b0a8c25e7e3ae517a0
  
https://github.com/Perl/perl5/commit/4e174ff491474862136c09b0a8c25e7e3ae517a0
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M cpan/Archive-Tar/t/02_methods.t

  Log Message:
  ---
  XXX skip Archive-Tar because of symlinks


  Commit: 61565ad41d8c28d1c9380f11b162ad448204bf5a
  
https://github.com/Perl/perl5/commit/61565ad41d8c28d1c9380f11b162ad448204bf5a
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M t/porting/cmp_version.t

  Log Message:
  ---
  XXX skip cmp_version.t because of sym links


  Commit: 243a210c254a34bb1c5256391008d3b4d1439061
  
https://github.com/Perl/perl5/commit/243a210c254a34bb1c5256391008d3b4d1439061
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M cpan/Sys-Syslog/t/syslog-inet-udp.t
M cpan/Sys-Syslog/t/syslog.t

  Log Message:
  ---
  XXX skip syslog tests because fail without LC_TIME


  Commit: 2a4191d171ec7bb7b4df51ebcac30396f32d6979
  
https://github.com/Perl/perl5/commit/2a4191d171ec7bb7b4df51ebcac30396f32d6979
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M dist/Tie-File/t/29a_upcopy.t

  Log Message:
  ---
  up timeout for dist/Tie-File/t/29a_upcopy.

[Perl/perl5] 85a3d7: embed.fnc: Match formal parameter name

2024-02-08 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 85a3d7082f1f125abdbb30bf7284971241384652
  
https://github.com/Perl/perl5/commit/85a3d7082f1f125abdbb30bf7284971241384652
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M embed.fnc
M proto.h

  Log Message:
  ---
  embed.fnc: Match formal parameter name

with that used in the actual function




[Perl/perl5] 05b8d3: Don't mortalize my_localeconv() for internal use

2024-02-08 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 05b8d3da76ae0dad22084a59705bcd769e24d06b
  
https://github.com/Perl/perl5/commit/05b8d3da76ae0dad22084a59705bcd769e24d06b
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  Don't mortalize my_localeconv() for internal use

For external consumption, retain the mortalization; but for internal
explicitly decrement the reference count when done.




[Perl/perl5] 934d12: perl.h: Clarify comment

2024-02-08 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 934d12ea622a543d5befb821fd0268864d7c21fc
  
https://github.com/Perl/perl5/commit/934d12ea622a543d5befb821fd0268864d7c21fc
  Author: Karl Williamson 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M perl.h

  Log Message:
  ---
  perl.h: Clarify comment




[Perl/perl5] 272221: sv_inline.h: Use Sv*OK (rather than Sv*OK_nog) in ...

2024-02-08 Thread TAKAI Kousuke via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 2722219de67416f3feecf348be9f179a6f38cb41
  
https://github.com/Perl/perl5/commit/2722219de67416f3feecf348be9f179a6f38cb41
  Author: TAKAI Kousuke <62541129+t-...@users.noreply.github.com>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M sv_inline.h

  Log Message:
  ---
  sv_inline.h: Use Sv*OK (rather than Sv*OK_nog) in Perl_SvUV_nomg, 
Perl_SvNV_nomg

It seems that some errors were made when original macros (SvUV_nomg
and SvNV_nomg in sv.h) were translated to inline functions.




[Perl/perl5] 764fd0: locale.c: use type-agnostic code for storing tm_zone

2024-02-08 Thread mauke via perl5-changes
  Branch: refs/heads/smoke-me/fix-bsd-build-tm_zone
  Home:   https://github.com/Perl/perl5
  Commit: 764fd079054bf7e7b1ceadf7db750bc8b34a7b79
  
https://github.com/Perl/perl5/commit/764fd079054bf7e7b1ceadf7db750bc8b34a7b79
  Author: Lukas Mai 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: use type-agnostic code for storing tm_zone

On some platforms, struct tm has a tm_zone member, but its type is not
consistent:

 - Linux: const char *tm_zone;
 - FreeBSD (& probably other BSDs): char *tm_zone;

In order to save/restore tm_zone, we can't just use a "const char *" or
"char *" variable because different parts of this code would always be a
const violation on one platform or the other.

Workaround: Use the tm_zone member of a full struct tm, which has the
right type no matter the platform.

Fixes #21948.




[Perl/perl5] 4a414a: mention length() in "uninitialized value" warnings

2024-02-08 Thread mauke via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 4a414abba40e6797ad6349011f8c20eac14c2b8d
  
https://github.com/Perl/perl5/commit/4a414abba40e6797ad6349011f8c20eac14c2b8d
  Author: Lukas Mai 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M sv.c
M t/lib/warnings/9uninit

  Log Message:
  ---
  mention length() in "uninitialized value" warnings

When perl looks for the source of "uninitialized value" warnings, it
treats length() as transparent: length(X) is undef iff X is undef, so it
makes sense to ignore length() when looking for the origin of the undef
value. However, this makes for misleading diagnostics: If $x is undef,
then 'length($x) == 0' triggers a "Use of uninitialized value $x in
numeric eq (==)" warning. This is correct insofar as (==) encountered an
undef value and $x is its origin, but incorrect in that $x is not one of
the operands of (==) in the source code.

This patch skips over length() when looking for the origin of undef (as
before), but adds "length(...)" around the name of the variable found,
if any.

Before:

$ perl -we 'my $x; $_ = length $x == 0'
Use of uninitialized value $x in numeric eq (==) at -e line 1.

(Misleading: $x is not an operand of (==).)

After:

$ perl -we 'my $x; $_ = length $x == 0'
Use of uninitialized value length($x) in numeric eq (==) at -e line 1.

Fixes #21930.


  Commit: 1b0ae1279c041daa07b860f7bcbcfce62123bfd2
  
https://github.com/Perl/perl5/commit/1b0ae1279c041daa07b860f7bcbcfce62123bfd2
  Author: Lukas Mai 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M sv.c

  Log Message:
  ---
  special-case shift/pop/splice in "uninitialized value" warnings

Before the preceding commit, this warning was halfway correct:

$ perl -we 'my @x; $_ = length(shift @x) == 0;'
Use of uninitialized value within @x in numeric eq (==) at -e line 1.

The "uninitialized value" did come from @x (sort of), but it was never
an element of @x, and no element of @x was used as an operand of (==).

After the preceding commit, we get:

Use of uninitialized value length(within @x) in numeric eq (==) at -e line 
1.

... which is invalid code. With this commit, we get:

Use of uninitialized value length(shift(@x)) in numeric eq (==) at -e line 
1.

(The same logic applies to pop().)

Also, splice() was overly optimistic in assigning blame:

$ perl -we 'my @x = 42; $_ = splice(@x, 0, 0) == 0'
Use of uninitialized value within @x in numeric eq (==) at -e line 1.

@x doesn't contain any undefs. The undef encountered by (==) was
returned from splice itself; it didn't come from any of splice's
arguments, so mentioning @x was just wrong.

With this commit we get:

Use of uninitialized value in numeric eq (==) at -e line 1.


  Commit: fd43d22ccafc3c907561cebbc48338b362006df4
  
https://github.com/Perl/perl5/commit/fd43d22ccafc3c907561cebbc48338b362006df4
  Author: Lukas Mai 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M t/lib/warnings/9uninit

  Log Message:
  ---
  add tests for new "uninitialized value" warnings


  Commit: a8d986b30eb356a56fa467c8753af0d122b0fcd7
  
https://github.com/Perl/perl5/commit/a8d986b30eb356a56fa467c8753af0d122b0fcd7
  Author: Lukas Mai 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M pod/perldelta.pod

  Log Message:
  ---
  add perldelta entry for new "uninitialized value" warnings


  Commit: 3baf103ace61b11c5d5c72a7bbd3ff909d8a96c0
  
https://github.com/Perl/perl5/commit/3baf103ace61b11c5d5c72a7bbd3ff909d8a96c0
  Author: Lukas Mai 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M sv.c
M t/lib/warnings/9uninit

  Log Message:
  ---
  fix "uninitialized value" warnings for readline()

Like getc or (sys)read, readline can return undef even if its argument
is fully defined.


Compare: https://github.com/Perl/perl5/compare/ccd5fe1fb534...3baf103ace61


[Perl/perl5] 50fe64: perl.c: Move handling of -m/-M switch into its own...

2024-02-08 Thread Paul Evans via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 50fe64fc14a1f4f8a1509d301849d21b4f954742
  
https://github.com/Perl/perl5/commit/50fe64fc14a1f4f8a1509d301849d21b4f954742
  Author: Paul "LeoNerd" Evans 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M perl.c

  Log Message:
  ---
  perl.c: Move handling of -m/-M switch into its own static function


  Commit: ccd5fe1fb5344104a4ddea9e4c5c41e883391676
  
https://github.com/Perl/perl5/commit/ccd5fe1fb5344104a4ddea9e4c5c41e883391676
  Author: Paul "LeoNerd" Evans 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M perl.c
M pod/perldelta.pod
M pod/perlrun.pod
M t/run/switchM.t

  Log Message:
  ---
  Permit a space after -M option to take module name from next argv (fixes 
#21932)


Compare: https://github.com/Perl/perl5/compare/5702bea2c8b4...ccd5fe1fb534


[Perl/perl5] 8e9664: Recognise a :reader attribute on class fields

2024-02-08 Thread Paul Evans via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 8e9664dc9f209718c35194d97a619c9bbef2b907
  
https://github.com/Perl/perl5/commit/8e9664dc9f209718c35194d97a619c9bbef2b907
  Author: Paul "LeoNerd" Evans 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M MANIFEST
M class.c
M pod/perlclass.pod
A t/class/accessor.t

  Log Message:
  ---
  Recognise a :reader attribute on class fields


  Commit: 5702bea2c8b4e316b739899be35dddb3fb35f5f2
  
https://github.com/Perl/perl5/commit/5702bea2c8b4e316b739899be35dddb3fb35f5f2
  Author: Paul "LeoNerd" Evans 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M class.c
M t/class/accessor.t

  Log Message:
  ---
  class.c: Ensure that split_attr_nameval() sets val=NULL on present-but-empty 
parens


Compare: https://github.com/Perl/perl5/compare/5f086631753d...5702bea2c8b4