[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#896077: texlive-bin: FTBFS on mips* and a few other arches - m-tx tests fail



Source: texlive-bin
Version: 2018.20180416.47457-1
Severity: serious
Tags: sid buster patch

Hi,

texlive-bin FTBFS on mips*, alpha, ia64, and powerpc with the m-tx tests
failing:
> ============================================
>    m-tx (TeX Live) 0.63: ./test-suite.log
> ============================================
> 
> # TOTAL: 1
> # PASS:  0
> # SKIP:  0
> # XFAIL: 0
> # FAIL:  1
> # XPASS: 0
> # ERROR: 0
> 
> .. contents:: :depth: 2
> 
> FAIL: m-tx
> ==========
> 
> #! /bin/sh -vx
> # Copyright 2017 Karl Berry <tex-live@tug.org>
> # Copyright 2012 Peter Breitenlohner <tex-live@tug.org>
> # You may freely use, modify and/or distribute this file.
> 
> rm -f mozart*
> + rm -f mozart*
> 
> cp $srcdir/tests/mozart.mtx .
> + cp ../../../utils/m-tx/tests/mozart.mtx .
> 
> set -x
> + set -x
> 
> ./prepmx mozart \
> 	&& diff mozart.pmx $srcdir/tests/mozart.pmx \
> 	|| exit 1
> + ./prepmx mozart
> ==> This is M-Tx 0.63 (Music from TeXt) <7 January 2018>
> ==>> Input from file mozart.mtx
> Writing to mozart.pmx
> You have not defined Meter, assuming "C" : WARNING in preamble
> No range defined for voice RH: WARNING in preamble
> No range defined for voice LH: WARNING in preamble
> PrePMX done.  Now run PMX.
> + diff mozart.pmx ../../../utils/m-tx/tests/mozart.pmx
> 8c8
> ---
>> 2 -1 2 4 4 0 6  0.00000 0 1 1 20 0
> + exit 1
> FAIL m-tx.test (exit status: 1)
> 
> ============================================================================
> Testsuite summary for m-tx (TeX Live) 0.63
> ============================================================================
> # TOTAL: 1
> # PASS:  0
> # SKIP:  0
> # XFAIL: 0
> # FAIL:  1
> # XPASS: 0
> # ERROR: 0
> ============================================================================
> See ./test-suite.log
> Please report to tex-k@tug.org
> ============================================================================

I believe this bug is fixed in m-tx 0.63a which is available on CPAN:
https://ctan.org/tex-archive/support/m-tx

texlive currently only has version 0.63 which is affected by this bug.
The underlying bug seems to be a buffer overflow which (naturally)
invokes undefined behaviour and causes the tests to break on some
architectures.

I've attached a patch taken from 0.63a which fixes this for me.

Thanks,
James
--- a/utils/m-tx/mtx-src/preamble.c        2018-01-09 14:14:43.000000000 +0000
+++ b/utils/m-tx/mtx-src/preamble.c        2018-04-08 12:23:37.000000000 +0100
@@ -801,8 +801,8 @@
     stave_size[i] = unspec;
   for (i = 0; i <= maxstaves; i++)
     nspace[i] = unspec;
-  nspace[i] = unspec;
-  stave_size[i-1] = unspec;
+  /* next line seems to be spurious.  0.63a RDT */
+  /* begin  nspace[i]:=unspec;  stave_size[i]:=unspec;  end; */
   n_pages = 1;
   n_systems = 1;
   readStyles();
--- a/utils/m-tx/mtx-src/preamble.pas      2018-01-09 14:14:43.000000000 +0000
+++ b/utils/m-tx/mtx-src/preamble.pas      2018-04-08 12:21:23.000000000 +0100
@@ -501,7 +501,8 @@
   for i:=1 to maxvoices do setVocal(i,false);
   for i:=1 to maxstaves do stave_size[i]:=unspec;
   for i:=0 to maxstaves do nspace[i]:=unspec;
-  begin  nspace[i]:=unspec;  stave_size[i]:=unspec;  end;
+  { next line seems to be spurious.  0.63a RDT }
+  { begin  nspace[i]:=unspec;  stave_size[i]:=unspec;  end; }  
   n_pages:=1; n_systems:=1;
   readStyles; old_known_styles := known_styles;
   for i:=1 to lines_in_paragraph do omit_line[i]:=false;

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: