bug-texinfo
[Top][All Lists]
Advanced

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

Re: Intermittent test failure in t/03coverage_braces.t definfoenclose_te


From: Gavin Smith
Subject: Re: Intermittent test failure in t/03coverage_braces.t definfoenclose_texinfo_commands
Date: Sun, 25 Feb 2024 19:01:21 +0000

On Sun, Feb 25, 2024 at 04:47:46PM +0000, Gavin Smith wrote:
> I occasionally get test failures in the
> "perl -w t/03coverage_braces.t definfoenclose_texinfo_commands" test,
> but cannot usually repeat it reliably.  I suspect some issue with memory
> corruption or issue with uninitialised memory, although I've not managed
> to get anything to show up with valgrind so far.
> 
> To get it to fail, I need to do
> "while perl -w t/03coverage_braces.t  ; do true ; done"
> and then wait a while.

It's not particulary easy to debug but by inserting debugging print
statements it appears to be a problem with the
count_remaining_args counter:

diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 5d22df810c..fe4cf65baf 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -2387,6 +2387,9 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
     {
       line++;
       /* comma as a command argument separator */
+      fprintf (stderr, "REMAINING ARGS %d (NVALUES %d)\n",
+               counter_value (&count_remaining_args, current->parent),
+               count_remaining_args.nvalues);
       if (counter_value (&count_remaining_args, current->parent) > 0)
         current = handle_comma (current, &line);
       else if (current->type == ET_line_arg && current->parent->cmd == CM_node)

Normally, with this test case, it prints

REMAINING ARGS -1 (NVALUES 0)

This shows that this counter is not being used.

However, on the occasions it fails, it prints

REMAINING ARGS -1 (NVALUES 1)

a few times before failing, and on the occasion it fails, it prints

REMAINING ARGS 1 (NVALUES 1)

So it appears there is a problem with the counter not being reset properly
before the test runs, or sometime early on in the run.

I'll try and do more investigation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]