Bug#812626: libfreecontact-perl: FTBFS - Parse errors: Bad plan. You planned 10 tests but ran 6.

Andreas Tille andreas at an3as.eu
Fri Mar 11 10:22:41 UTC 2016


Hi Niko,

cool.  Thanks a lot for spotting this.  I commited the patch to Git.

When trying to do the final build I'm realising a totally unexpected and
unrelated problem:  The Perl files will be installed into /home/... in
the resulting deb.  Since I can not see any sensible reason and do not
want to stupidly hack around this:  Did something in the Perl build
system changed I should know to prevent such issues?

Kind regards

       Andreas.

PS: Please CC me.  I'm not subscribed to the pkg-perl list.

On Fri, Mar 11, 2016 at 11:38:49AM +0200, Niko Tyni wrote:
> Control: tag -1 patch
> 
> On Wed, Mar 09, 2016 at 10:30:29AM +0100, Andreas Tille wrote:
> > On Mon, Feb 22, 2016 at 09:50:41AM +0100, Michael Tautschnig wrote:
> > > Control: severity -1 wishlist
> > > Control: retitle -1 libfreecontact-perl: FTBFS when optimisation is disabled
> 
> > > Apologies for taking so long to get back to this one. I have now been able to
> > > reproduce both the failing and the non-failing case. The key is to compile
> > > with/without optimisation. Thus:
> 
> > Thanks for the clarification.  I wonder whether inside the Perl team
> > some experiences exist regarding failures when doing no optimisation.
> 
> It's passing an uninitialized pointer to libfreecontact. Proposed patch attached.
> -- 
> Niko Tyni   ntyni at debian.org

> From 4570fcae64c5f62ef1bf7558063064a60db62d0b Mon Sep 17 00:00:00 2001
> From: Niko Tyni <ntyni at debian.org>
> Date: Fri, 11 Mar 2016 11:25:59 +0200
> Subject: [PATCH] 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).
> 
> Bug-Debian: https://bugs.debian.org/812626
> ---
>  FreeContact.xsp | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/FreeContact.xsp b/FreeContact.xsp
> index b0c2497..f002df1 100644
> --- a/FreeContact.xsp
> +++ b/FreeContact.xsp
> @@ -91,7 +91,10 @@ predictor::_run( __ali, __cp, __density, __gapth, __mincontsep, __pseudocnt, __p
>      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& __ali, freq_vec_t &__aliw, double __wtot
>      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,
> -- 
> 2.7.0
> 


-- 
http://fam-tille.de



More information about the pkg-perl-maintainers mailing list