Public bug reported:

[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@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@nimmie:~# lsb_release -rd
Description:    Ubuntu 20.04 LTS
Release:        20.04
(focal-amd64)root@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

** Patch added: "biplabg.patch"
   
https://bugs.launchpad.net/bugs/1903548/+attachment/5432663/+files/biplabg.patch

** Tags added: focal

** Changed in: nauty (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1903548

Title:
  nauty-biplabg gives "sorry, this program doesn't support digraphs yet"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nauty/+bug/1903548/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to