Hi!

On Thu, Apr 30, 2026 at 07:47:28PM +0100, Bruno Haible wrote:
> Hi,
> 
> Thomas Klausner wrote:
> > While updating gnutls in pkgsrc to 3.8.13 and running the test suite
> > on NetBSD 11.99.5/x86_64, I had a test failure:
> > 
> > [1]   Abort trap (core dumped) "${@}" >>"${log_file}" 2>&1
> > FAIL: test-parse-datetime
> > 
> > test-suite.log has:
> > 
> > FAIL: test-parse-datetime
> > =========================
> > 
> > test-parse-datetime.c:577: assertion 'parse_datetime (&result, buf, &now)' 
> > failed
> > FAIL test-parse-datetime (exit status: 134)
> > 
> > I can reproduce this with a gnulib git checkout from just now.
> 
> I can reproduce it with a testdir for module 'parse-datetime' on NetBSD 
> 11.0_RC3.
> 
> In this code:
> 
> #ifdef _SC_TZNAME_MAX
>     tzname_max = sysconf (_SC_TZNAME_MAX);
> #endif
>     enum { tzname_alloc = 2000 };
>     if (tzname_max < 0)
>       tzname_max = errno ? 6 : tzname_alloc;
>     int tzname_len = tzname_alloc < tzname_max ? tzname_alloc : tzname_max;
> 
> tzname_max is 511, and for values of tzname_len that are <= 254, the test
> succeeds. Whereas for tzname_len >= 255, the test fails.
> 
> So, either sysconf (_SC_TZNAME_MAX) is too large (should be 254 instead of 
> 511),
> or the time zone processing inside libc needs bigger buffers.
> 
> Are you in a position to report this back to the NetBSD people?

Thanks for the analysis. I've filed https://gnats.netbsd.org/60219

Feel free to amend it if I missed anything.

Cheers,
 Thomas

Reply via email to