[tlbuild] mendexk test failure on Cygwin
Ken Brown
kbrow1i at gmail.com
Thu Jan 8 19:14:32 CET 2015
On 1/8/2015 12:30 PM, Ken Brown wrote:
> On 1/8/2015 8:48 AM, Peter Breitenlohner wrote:
>> On Thu, 8 Jan 2015, Ken Brown wrote:
>>
>>> The mendexk test fails on Cygwin as follows:
>>>
>>> $ cat ~/src/texlive/test.x86_64/Work/texk/mendexk/test-suite.log
>>> ==============================================
>>> mendex (TeX Live) 2.6f: ./test-suite.log
>>> ==============================================
>>>
>>> # TOTAL: 1
>>> # PASS: 0
>>> # SKIP: 0
>>> # XFAIL: 0
>>> # FAIL: 1
>>> # XPASS: 0
>>> # ERROR: 0
>>>
>>> .. contents:: :depth: 2
>>>
>>> FAIL: tests/mendex
>>> ==================
>>>
>>> This is mendex version 2.6f [14-Aug-2009] (utf8.euc) (TeX Live 2015/dev).
>>> Scanning input file ../../../texk/mendexk/tests/foo.idx....done (3 entries
>>> accepted, 0 rejected).
>>> 3 entries accepted, 0 rejected.
>>> Sorting index....done(0 comparisons).
>>> Sorting pages....done(4 comparisons).
>>> Making index file....done.
>>> 0 warnings, written in foo.ilg1.
>>> Output written in foo.ind1.
>>> 3c3
>>> < \item foo, \mac{1}, 1
>>> ---
>>> > \item foo,
>>>
>>>
>>> A bisection shows that the problem starts with revision 34287. Specifically,
>>> reverting the change to texk/mendexk/fwrite.c in that revision fixes the
>>> problem. Let me know what further information I can provide to help track this
>>> down.
>>
>> Hi Ken and Marc,
>
> Hi Peter,
>
>> failure for both 32 and 64 bit?
>
> Yes.
>
>> Which version of gcc?
>
> 4.8.3
>
>> Does texk/mendexk/c-auto.h define HAVE___VA_ARGS__?
>
> Yes.
The following patch fixes the problem for me, but I don't know why it should be platform-specific:
--- fwrite.c~ 2015-01-01 21:53:19.000000000 -0500
+++ fwrite.c 2015-01-08 13:08:36.096739900 -0500
@@ -22,9 +22,9 @@
#ifdef HAVE___VA_ARGS__
/* Use C99 variadic macros if they are supported. */
#define SPRINTF(buf, ...) \
- snprintf(buf, sizeof(buf), __VA_ARGS__)
+ snprintf(buf, BUFFERLEN, __VA_ARGS__)
#define SAPPENDF(buf, ...) \
- snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), __VA_ARGS__)
+ snprintf(buf + strlen(buf), BUFFERLEN - strlen(buf), __VA_ARGS__)
#else
/* Alternatively use static inline functions (all buffers have size BUFFERLEN). */
static inline int SPRINTF(char *buf, const char *format, ...)
Regards,
Ken
More information about the tlbuild
mailing list