[Bug 1903548] [NEW] nauty-biplabg gives "sorry, this program doesn't support digraphs yet"

Launchpad Bug Tracker 1903548 at bugs.launchpad.net
Mon Nov 9 18:27:26 UTC 2020


You have been subscribed to a public bug by Doug Torrance (profzoom):

[Impact]
Running nauty-biplabg in focal always results in an error.  In particular, it always complains that a digraph has been input even if this is not the case.

This is due to the following code in nauty:

int
main(int argc, char *argv[])
{
        char *infilename,*outfilename;
        FILE *infile,*outfile;
        boolean badargs,quiet;
	int j,m,n,argnum;
	int codetype,outcode;
	graph *g;
	nauty_counter nin,nout;
        char *arg,sw;
	double t;

[...snip...]

        NODIGRAPHSYET(codetype);

	if (infilename && infilename[0] == '-') infilename = NULL;
	infile = opengraphfile(infilename,&codetype,FALSE,1);
	if (!infile) exit(1);
	if (!infilename) infilename = "stdin";

The NODIGRAPHSYET macro is defined in a header file and is responsible
for our error message:

#define NODIGRAPHSYET(code) if (((code)&DIGRAPH6)) \
  gt_abort(">E Sorry, this program doesn't support digraphs yet.\n")

The variable codetype is not initialized until the call to
opengraphfile, so if we're unlucky, it might find that DIGRAPH6 bit in
whatever piece of memory it's pointing to at the time.

This bug results in build failures when building the computer algebra
software Macaulay2 in focal, as one of its packages calls nauty-biplabg
when building examples and running tests.  See
https://github.com/Macaulay2/M2/issues/1408.

This has been fixed in nauty version 2.7 (which is in groovy and hirsute
already) by moving the call to NODIGRAPHSYET a few lines lower.  See the
attached patch.

[Test Case]
(focal-amd64)root at nimmie:~# nauty-biplabg 
>A biplabg
>E Sorry, this program doesn't support digraphs yet.

[Where problems could occur]
None known.  The attached patch is very small.

Further information:
(focal-amd64)root at nimmie:~# lsb_release -rd
Description:	Ubuntu 20.04 LTS
Release:	20.04
(focal-amd64)root at nimmie:~# apt-cache policy nauty
nauty:
  Installed: 2.6r10+ds-1ubuntu1
  Candidate: 2.6r10+ds-1ubuntu1
  Version table:
 *** 2.6r10+ds-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

** Affects: nauty (Ubuntu)
     Importance: Undecided
         Status: Fix Released


** Tags: focal
-- 
nauty-biplabg gives "sorry, this program doesn't support digraphs yet"
https://bugs.launchpad.net/bugs/1903548
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list