import perl-threads-shared-1.61-457.module+el8.6.0+13324+628a2397

c8-stream-5.32 imports/c8-stream-5.32/perl-threads-shared-1.61-457.module+el8.6.0+13324+628a2397
CentOS Sources 3 years ago committed by MSVSphere Packaging Team
commit b39cd9143b

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/threads-shared-1.59.tar.gz

@ -0,0 +1 @@
ae80152e37290e7a85890d0180f964cb5a01f4c1 SOURCES/threads-shared-1.59.tar.gz

@ -0,0 +1,110 @@
From 2ec58402d05eb12d0b9387963941f1e445d9aa5b Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Fri, 26 Apr 2019 15:00:30 +0200
Subject: [PATCH] Upgrade to 1.60
---
lib/threads/shared.pm | 4 ++--
shared.xs | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/lib/threads/shared.pm b/lib/threads/shared.pm
index f7e5ff8..45ad154 100644
--- a/lib/threads/shared.pm
+++ b/lib/threads/shared.pm
@@ -8,7 +8,7 @@ use Config;
use Scalar::Util qw(reftype refaddr blessed);
-our $VERSION = '1.59'; # Please update the pod, too.
+our $VERSION = '1.60'; # Please update the pod, too.
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -196,7 +196,7 @@ threads::shared - Perl extension for sharing data structures between threads
=head1 VERSION
-This document describes threads::shared version 1.59
+This document describes threads::shared version 1.60
=head1 SYNOPSIS
diff --git a/shared.xs b/shared.xs
index d0f7d1e..6cdf094 100644
--- a/shared.xs
+++ b/shared.xs
@@ -115,6 +115,17 @@
* without the prefix (e.g., sv, tmp or obj).
*/
+/* this is lower overhead than warn() and less likely to interfere
+ with other parts of perl (like with the debugger.)
+*/
+#ifdef SHARED_TRACE_LOCKS
+# define TRACE_LOCK(x) DEBUG_U(x)
+# define TRACE_LOCKv(x) DEBUG_Uv(x)
+#else
+# define TRACE_LOCK(x)
+# define TRACE_LOCKv(x)
+#endif
+
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
@@ -211,8 +222,24 @@ recursive_lock_release(pTHX_ recursive_lock_t *lock)
if (--lock->locks == 0) {
lock->owner = NULL;
COND_SIGNAL(&lock->cond);
+ TRACE_LOCK(
+ PerlIO_printf(Perl_debug_log, "shared lock released %p for %p at %s:%d\n",
+ lock, aTHX, CopFILE(PL_curcop), CopLINE(PL_curcop))
+ );
+ }
+ else {
+ TRACE_LOCKv(
+ PerlIO_printf(Perl_debug_log, "shared lock unbump %p for %p at %s:%d\n",
+ lock, aTHX, CopFILE(PL_curcop), CopLINE(PL_curcop))
+ );
}
}
+ else {
+ TRACE_LOCK(
+ PerlIO_printf(Perl_debug_log, "bad shared lock release %p for %p (owned by %p) at %s:%d\n",
+ lock, aTHX, lock->owner, CopFILE(PL_curcop), CopLINE(PL_curcop))
+ );
+ }
MUTEX_UNLOCK(&lock->mutex);
}
@@ -224,8 +251,16 @@ recursive_lock_acquire(pTHX_ recursive_lock_t *lock, const char *file, int line)
assert(aTHX);
MUTEX_LOCK(&lock->mutex);
if (lock->owner == aTHX) {
+ TRACE_LOCKv(
+ PerlIO_printf(Perl_debug_log, "shared lock bump %p (%p) at %s:%d\n",
+ lock, lock->owner, CopFILE(PL_curcop), CopLINE(PL_curcop))
+ );
lock->locks++;
} else {
+ TRACE_LOCK(
+ PerlIO_printf(Perl_debug_log, "shared lock try %p for %p (owned by %p) at %s:%d\n",
+ lock, aTHX, lock->owner, CopFILE(PL_curcop), CopLINE(PL_curcop))
+ );
while (lock->owner) {
#ifdef DEBUG_LOCKS
Perl_warn(aTHX_ " %p waiting - owned by %p %s:%d\n",
@@ -233,6 +268,10 @@ recursive_lock_acquire(pTHX_ recursive_lock_t *lock, const char *file, int line)
#endif
COND_WAIT(&lock->cond,&lock->mutex);
}
+ TRACE_LOCK(
+ PerlIO_printf(Perl_debug_log, "shared lock got %p at %s:%d\n",
+ lock, CopFILE(PL_curcop), CopLINE(PL_curcop))
+ );
lock->locks = 1;
lock->owner = aTHX;
#ifdef DEBUG_LOCKS
--
2.20.1

@ -0,0 +1,57 @@
From c48ee9c79eb7c4a36b7758fc4c3209ca0e5d759b Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Tue, 21 Apr 2020 12:52:31 +0200
Subject: [PATCH] Upgrade to 1.61
---
lib/threads/shared.pm | 4 ++--
t/stress.t | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/threads/shared.pm b/lib/threads/shared.pm
index 45ad154..bd0e437 100644
--- a/lib/threads/shared.pm
+++ b/lib/threads/shared.pm
@@ -8,7 +8,7 @@ use Config;
use Scalar::Util qw(reftype refaddr blessed);
-our $VERSION = '1.60'; # Please update the pod, too.
+our $VERSION = '1.61'; # Please update the pod, too.
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -196,7 +196,7 @@ threads::shared - Perl extension for sharing data structures between threads
=head1 VERSION
-This document describes threads::shared version 1.60
+This document describes threads::shared version 1.61
=head1 SYNOPSIS
diff --git a/t/stress.t b/t/stress.t
index 1dd95e3..ccdeb0e 100644
--- a/t/stress.t
+++ b/t/stress.t
@@ -12,7 +12,7 @@ BEGIN {
exit(0);
}
- # http://lists.alioth.debian.org/pipermail/perl-maintainers/2011-June/002285.html
+ # https://lists.alioth.debian.org/pipermail/perl-maintainers/2011-June/002285.html
# There _is_ TLS support on m68k, but this stress test is overwhelming
# for the hardware
if ($^O eq 'linux' && $Config{archname} =~ /^m68k/) {
@@ -179,7 +179,7 @@ use threads::shared;
} elsif ($timeouts) {
# Frequently fails under MSWin32 due to deadlocking bug in Windows
# hence test is TODO under MSWin32
- # http://rt.perl.org/rt3/Public/Bug/Display.html?id=41574
+ # https://rt.perl.org/rt3/Public/Bug/Display.html?id=41574
# http://support.microsoft.com/kb/175332
if ($^O eq 'MSWin32') {
print("not ok 1 # TODO - not reliable under MSWin32\n")
--
2.21.1

@ -0,0 +1,57 @@
From b52cdd7a8525325deba04554d8a00a578c397d56 Mon Sep 17 00:00:00 2001
From: David Mitchell <davem@iabyn.com>
Date: Thu, 11 Jul 2019 15:17:48 +0100
Subject: [PATCH] threads::shared: fix leak
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When assigning a shared reference value to a variable containing a
shared string, the PV buffer in the shared space was leaked. For
example:
my $s :shared = "foo";
my $t :shared = shared_clone(\"bar");
$s = $t; # "foo" in shared space leaked
This was showing up as failed smokes under ASan.
Petr Písař: Ported to 1.60 from perl commit
59c73bd3d62c5096a6f9b2e3cbe05e1ab4c158cf.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
shared.xs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/shared.xs b/shared.xs
index 6cdf094..858c6d6 100644
--- a/shared.xs
+++ b/shared.xs
@@ -818,12 +818,19 @@ sharedsv_scalar_store(pTHX_ SV *sv, SV *ssv)
SV *obj = SvRV(sv);
SV *sobj = Perl_sharedsv_find(aTHX_ obj);
if (sobj) {
+ SV* tmpref;
SHARED_CONTEXT;
- (void)SvUPGRADE(ssv, SVt_RV);
- sv_setsv_nomg(ssv, &PL_sv_undef);
+ /* Creating a tmp ref to sobj then assigning it to ssv ensures
+ * that any previous contents of ssv are correctly freed
+ * by sv_setsv(). Not sure if there is a better, API-legal way
+ * to achieve this */
+ tmpref = newSV_type(SVt_RV);
+ SvRV_set(tmpref, sobj);
+ SvROK_on(tmpref);
+ SvREFCNT_inc_simple_NN(sobj);
+ sv_setsv_nomg(ssv, tmpref);
+ SvREFCNT_dec_NN(tmpref);
- SvRV_set(ssv, SvREFCNT_inc(sobj));
- SvROK_on(ssv);
if (SvOBJECT(sobj)) {
/* Remove any old blessing */
SvREFCNT_dec(SvSTASH(sobj));
--
2.20.1

@ -0,0 +1,278 @@
%global base_version 1.59
Name: perl-threads-shared
Version: 1.61
Release: 457%{?dist}
Summary: Perl extension for sharing data structures between threads
License: GPL+ or Artistic
URL: https://metacpan.org/release/threads-shared
Source0: https://cpan.metacpan.org/authors/id/J/JD/JDHEDDEN/threads-shared-%{base_version}.tar.gz
# Unbundled from perl 5.29.10
Patch0: threads-shared-1.59-Upgrade-to-1.60.patch
# Fix a memory leak when assigning a shared reference to a shared string
# variable, in perl after 5.31.1
Patch1: threads-shared-1.60-threads-shared-fix-leak.patch
# Unbundled from perl 5.32.0
Patch2: threads-shared-1.59-Upgrade-to-1.61.patch
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: make
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(Config)
# Config_m not needed
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Spec)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Run-time:
BuildRequires: perl(Carp)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(threads) >= 1.73
BuildRequires: perl(XSLoader)
# Tests:
BuildRequires: perl(ExtUtils::testlib)
BuildRequires: perl(File::Path)
BuildRequires: perl(Test::More)
# Optional tests:
BuildRequires: perl(POSIX)
BuildRequires: perl(Time::HiRes)
# Win32 not needed
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Carp)
Requires: perl(threads) >= 1.73
Requires: perl(XSLoader)
%{?perl_default_filter}
%description
By default, variables are private to each thread, and each newly created
thread gets a private copy of each existing variable. This module allows
you to share variables across different threads (and pseudo-forks on
Win32). It is used together with the threads module.
%prep
%setup -q -n threads-shared-%{base_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS"
%{make_build}
%install
%{make_install}
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%check
unset GIT_DIR PERL_BUILD_PACKAGING PERL_CORE PERL_RUNPERL_DEBUG \
RUN_MAINTAINER_TESTS
make test
%files
%doc Changes examples README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/threads*
%{_mandir}/man3/*
%changelog
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.61-457
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.61-456
- Upgrade to 1.61 as provided in perl-5.32.0
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.60-441
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.60-440
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Jul 12 2019 Petr Pisar <ppisar@redhat.com> - 1.60-439
- Fix a memory leak when assigning a shared reference to a shared string
variable
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.60-438
- Increase release to favour standalone package
* Fri Apr 26 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.60-1
- Upgrade to 1.60 as provided in perl-5.29.10
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.59-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Nov 30 2018 Petr Pisar <ppisar@redhat.com> - 1.59-1
- 1.59 bump
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.58-417
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jun 27 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.58-416
- Increase release to favour standalone package
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.58-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jan 24 2018 Petr Pisar <ppisar@redhat.com> - 1.58-1
- 1.58 bump
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.57-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.57-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.57-2
- Perl 5.26 re-rebuild of bootstrapped packages
* Mon Jun 05 2017 Petr Pisar <ppisar@redhat.com> - 1.57-1
- 1.57 bump
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.56-393
- Perl 5.26 rebuild
* Thu May 11 2017 Petr Pisar <ppisar@redhat.com> - 1.56-1
- Upgrade to 1.56 as provided in perl-5.25.12
* Fri Apr 21 2017 Petr Pisar <ppisar@redhat.com> - 1.55-2
- Fix arenas allocation (RT#131124)
* Mon Feb 27 2017 Petr Pisar <ppisar@redhat.com> - 1.55-1
- 1.55 bump
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.54-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jan 02 2017 Petr Pisar <ppisar@redhat.com> - 1.54-1
- 1.54 bump
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.52-3
- Perl 5.24 rebuild
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.52-2
- Perl 5.24 rebuild
* Tue May 17 2016 Petr Pisar <ppisar@redhat.com> - 1.52-1
- 1.52 bump
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.51-365
- Increase release to favour standalone package
* Mon May 02 2016 Petr Pisar <ppisar@redhat.com> - 1.51-1
- 1.51 bump
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.48-347
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.48-346
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Jun 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.48-345
- Increase release to favour standalone package
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.48-341
- Perl 5.22 rebuild
* Tue May 05 2015 Petr Pisar <ppisar@redhat.com> - 1.48-340
- 1.48 bump in order to dual-live with perl 5.22
* Wed Sep 03 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.46-310
- Increase release to favour standalone package
* Tue Aug 26 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.46-5
- Perl 5.20 rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.46-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.46-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Feb 19 2014 Petr Pisar <ppisar@redhat.com> - 1.46-2
- Declare optional tests
* Wed Feb 05 2014 Petr Pisar <ppisar@redhat.com> - 1.46-1
- 1.46 bump
* Thu Nov 14 2013 Petr Pisar <ppisar@redhat.com> - 1.45-1
- 1.45 bump
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.43-291
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jul 15 2013 Petr Pisar <ppisar@redhat.com> - 1.43-290
- Increase release to favour standalone package
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1.43-5
- Link minimal build-root packages against libperl.so explicitly
* Tue Jul 02 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1.43-4
- Remove BR perl(Test)
* Tue Jul 02 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1.43-3
- Specify all dependencies
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.43-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Jan 15 2013 Petr Pisar <ppisar@redhat.com> - 1.43-1
- 1.43 bump
* Fri Nov 23 2012 Jitka Plesnikova <jplesnik@redhat.com> - 1.42-2
- Add BR perl(File::Spec)
- Replace PERL_INSTALL_ROOT with DESTDIR
- Remove deleting empty directories
- Remove defattr
* Wed Oct 03 2012 Petr Pisar <ppisar@redhat.com> - 1.42-1
- 1.42 bump
* Mon Sep 10 2012 Petr Pisar <ppisar@redhat.com> - 1.41-1
- 1.41 bump
* Mon Aug 13 2012 Marcela Mašláňová <mmaslano@redhat.com> - 1.40-240
- bump release to override sub-package from perl.spec
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.40-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Jun 06 2012 Petr Pisar <ppisar@redhat.com> - 1.40-3
- Perl 5.16 rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.40-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Sep 12 2011 Petr Pisar <ppisar@redhat.com> - 1.40-1
- 1.40 bump
* Tue Sep 06 2011 Petr Pisar <ppisar@redhat.com> - 1.39-1
- 1.39 bump
* Wed Aug 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.37-3
- change path on vendor, so our debuginfo are not conflicting with
perl core debuginfos
* Mon Jun 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.37-2
- Perl mass rebuild
* Tue Apr 26 2011 Petr Pisar <ppisar@redhat.com> - 1.37-1
- 1.37 bump
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.36-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jan 03 2011 Petr Pisar <ppisar@redhat.com> - 1.36-1
- 1.36 bump
* Mon Oct 11 2010 Petr Pisar <ppisar@redhat.com> - 1.34-1
- 1.34 bump
* Thu Sep 23 2010 Petr Pisar <ppisar@redhat.com> 1.33-1
- Specfile autogenerated by cpanspec 1.78.
- Fix dependencies
- Requires perl(Scalar::Util) is autodetected
- Do not provide private library
- Remove pre-F12 BuildRoot stuff
Loading…
Cancel
Save