Skip to content

Commit 131bc41

Browse files
committed
version 2.001002
1 parent 64ab793 commit 131bc41

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

Changes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
Revision history for Function-Parameters
22

3+
2.001002 2017-11-09
4+
- Fix crash when Function::Parameters is loaded at runtime by
5+
multiple threads (a stack overflow due to infinite recursion).
6+
This is arguably a core bug (#132413). The current workaround
7+
employed by Function::Parameters slightly abuses an internal perl
8+
mutex meant for something else (protecting op checkers), but it
9+
fixes the issue on perls v5.16 .. v5.26.
10+
v5.14 doesn't have this API yet, so the workaround is not thread
11+
safe there. It is technically possible to still run into this issue
12+
if two threads initialize Function::Parameters at the exact same
13+
moment (I haven't managed to reproduce this yet, so hopefully it's
14+
unlikely in practice).
15+
It is possible to completely avoid the problem on all versions of
16+
perl and Function::Parameters by making sure the module is loaded
17+
before the first thread is created.
18+
319
2.001001 2017-07-12
420
- fix duplicate type check on invocant:
521
method foo(T $self: $x) { ... }

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ t/strict_3.fail
143143
t/strict_4.fail
144144
t/strict_5.fail
145145
t/threads.t
146+
t/threads2.t
146147
t/types_auto.t
147148
t/types_caller.t
148149
t/types_custom.t

lib/Function/Parameters.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sub _croak {
1313

1414
use XSLoader;
1515
BEGIN {
16-
our $VERSION = '2.001001';
16+
our $VERSION = '2.001002';
1717
#$VERSION =~ s/-TRIAL[0-9]*\z//;
1818
XSLoader::load;
1919
}

lib/Function/Parameters/Info.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use warnings;
66
use Function::Parameters;
77
use Carp ();
88

9-
our $VERSION = '2.001001';
9+
our $VERSION = '2.001002';
1010

1111
{
1212
package Function::Parameters::Param;

0 commit comments

Comments
 (0)