[perl-DB_File] Initialize db_DESTROY return variable
Petr Pisar
ppisar at fedoraproject.org
Thu Aug 7 16:05:48 UTC 2014
commit 51e7504338669349d0a467006242555d3be7fd61
Author: Petr Písař <ppisar at redhat.com>
Date: Thu Aug 7 18:05:14 2014 +0200
Initialize db_DESTROY return variable
...File-objects-only-from-original-thread-co.patch | 15 ++++++++-------
perl-DB_File.spec | 5 ++++-
2 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/DB_File-1.831-Destroy-DB_File-objects-only-from-original-thread-co.patch b/DB_File-1.831-Destroy-DB_File-objects-only-from-original-thread-co.patch
index 84d4add..3a0974b 100644
--- a/DB_File-1.831-Destroy-DB_File-objects-only-from-original-thread-co.patch
+++ b/DB_File-1.831-Destroy-DB_File-objects-only-from-original-thread-co.patch
@@ -1,4 +1,4 @@
-From d96d40d46bca3c523b1d4d2b580691dc7d8e9802 Mon Sep 17 00:00:00 2001
+From d4499d6a6f8007df03fe5292aab4ba0367499dd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Tue, 10 Jun 2014 14:28:09 +0200
Subject: [PATCH] Destroy DB_File objects only from original thread context
@@ -21,14 +21,14 @@ Closes RT#61912.
Signed-off-by: Petr Písař <ppisar at redhat.com>
---
- DB_File.xs | 49 ++++++++++++++++++++++++++++++-------------------
+ DB_File.xs | 50 +++++++++++++++++++++++++++++++-------------------
MANIFEST | 1 +
t/db-threads.t | 46 ++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 77 insertions(+), 19 deletions(-)
+ 3 files changed, 78 insertions(+), 19 deletions(-)
create mode 100644 t/db-threads.t
diff --git a/DB_File.xs b/DB_File.xs
-index 679c416..685888e 100755
+index 679c416..762f4ed 100755
--- a/DB_File.xs
+++ b/DB_File.xs
@@ -397,6 +397,7 @@ typedef union INFO {
@@ -55,7 +55,7 @@ index 679c416..685888e 100755
/* Default to HASH */
RETVAL->filtering = 0 ;
-@@ -1571,27 +1574,35 @@ db_DESTROY(db)
+@@ -1571,27 +1574,36 @@ db_DESTROY(db)
INIT:
CurrentDB = db ;
Trace(("DESTROY %p\n", db));
@@ -77,6 +77,7 @@ index 679c416..685888e 100755
- SvREFCNT_dec(db->filter_store_value) ;
- safefree(db) ;
+ CODE:
++ RETVAL = 0;
+ if (db && db->owner == aTHX) {
+ RETVAL = db_DESTROY(db);
#ifdef DB_VERSION_MAJOR
@@ -124,11 +125,11 @@ index e460e81..47f43f7 100644
META.yml Module meta-data (added by MakeMaker)
diff --git a/t/db-threads.t b/t/db-threads.t
new file mode 100644
-index 0000000..8987e64
+index 0000000..b9f69b6
--- /dev/null
+++ b/t/db-threads.t
@@ -0,0 +1,46 @@
-+#!./perl
++#!./perl
+
+use warnings;
+use strict;
diff --git a/perl-DB_File.spec b/perl-DB_File.spec
index d456046..456725c 100644
--- a/perl-DB_File.spec
+++ b/perl-DB_File.spec
@@ -1,6 +1,6 @@
Name: perl-DB_File
Version: 1.831
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Perl5 access to Berkeley DB version 1.x
License: GPL+ or Artistic
Group: Development/Libraries
@@ -72,6 +72,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Aug 07 2014 Petr Pisar <ppisar at redhat.com> - 1.831-4
+- Initialize db_DESTROY return variable (bug #1107732)
+
* Thu Aug 07 2014 Petr Pisar <ppisar at redhat.com> - 1.831-3
- Destroy DB_File objects only from original thread context (bug #1107732)
More information about the perl-devel
mailing list