[med-svn] [libfreecontact-perl] 01/03: Inject patch by Niko Tyni <ntyni at debian.org> (thanks a lot)

Andreas Tille tille at debian.org
Fri Mar 11 10:16:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository libfreecontact-perl.

commit 86d4a96018934612ac90e42b66b6a5dda59bc9d6
Author: Andreas Tille <tille at debian.org>
Date:   Fri Mar 11 11:05:06 2016 +0100

    Inject patch by Niko Tyni <ntyni at debian.org> (thanks a lot)
---
 .../patches/0001-Fix-timing-initialization.patch   | 37 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 38 insertions(+)

diff --git a/debian/patches/0001-Fix-timing-initialization.patch b/debian/patches/0001-Fix-timing-initialization.patch
new file mode 100644
index 0000000..d15d457
--- /dev/null
+++ b/debian/patches/0001-Fix-timing-initialization.patch
@@ -0,0 +1,37 @@
+Author: Niko Tyni <ntyni at debian.org>
+Last-Update: Fri, 11 Mar 2016 11:25:59 +0200
+Bug-Debian: https://bugs.debian.org/812626
+Description: Fix __timing initialization
+ When Perl code passes a 'timing' parameter that is not a hash reference,
+ for instance an undefined value, the '__timing' pointer passed to
+ libfreecontact needs to be explicitly initialized.
+ .
+ This fixes segmentation faults in t/02test.t when built
+ without optimization (gcc -O0).
+
+--- a/FreeContact.xsp
++++ b/FreeContact.xsp
+@@ -91,7 +91,10 @@ predictor::_run( __ali, __cp, __density,
+     time_res_t timing;
+   CODE:
+     try {
+-      if(items>=17 && SvROK(ST(16)) && SvTYPE(SvRV(ST(16))) == SVt_PVHV) __timing = &timing;
++      if(items>=17) {
++        if (SvROK(ST(16)) && SvTYPE(SvRV(ST(16))) == SVt_PVHV) __timing = &timing;
++        else __timing = NULL;
++      }
+       RETVAL = THIS->run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __pscnt_weight, __estimate_ivcov, __shrink_lambda, __cov20, __apply_gapth, __rho, __veczw, __num_threads, __icme_timeout, __timing );
+     }
+     catch (freecontact::icme_timeout_error& e)
+@@ -116,7 +119,10 @@ predictor::_run_with_seq_weights(ali_t&
+     time_res_t timing;
+   CODE:
+     try {
+-      if(items>=17 && SvROK(ST(16)) && SvTYPE(SvRV(ST(16))) == SVt_PVHV) __timing = &timing;
++      if(items>=17) {
++        if (SvROK(ST(16)) && SvTYPE(SvRV(ST(16))) == SVt_PVHV) __timing = &timing;
++        else __timing = NULL;
++      }
+       RETVAL = THIS->run( __ali, __aliw, __wtot,
+         __density, __gapth, __mincontsep,
+         __pseudocnt, __pscnt_weight, __estimate_ivcov, __shrink_lambda,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d7cdc83
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-timing-initialization.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libfreecontact-perl.git



More information about the debian-med-commit mailing list