nauty-biplabg gives "sorry, this program doesn't support digraphs yet"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nauty (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Focal |
New
|
Medium
|
Unassigned |
Bug Description
[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,
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(
if (infilename && infilename[0] == '-') infilename = NULL;
infile = opengraphfile(
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:/
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]
* Before:
$ echo 'ES\o' > foo
$ nauty-biplabg -q foo
>E Sorry, this program doesn't support digraphs yet.
* After:
$ echo 'ES\o' > foo
$ nauty-biplabg -q foo
EBz_
[Where problems could occur]
None known. The attached patch is very small.
Further information:
(focal-
Description: Ubuntu 20.04 LTS
Release: 20.04
(focal-
nauty:
Installed: 2.6r10+ds-1ubuntu1
Candidate: 2.6r10+ds-1ubuntu1
Version table:
*** 2.6r10+ds-1ubuntu1 500
500 http://
100 /var/lib/
Changed in nauty (Ubuntu): | |
status: | In Progress → Fix Released |
importance: | Undecided → Medium |
Changed in nauty (Ubuntu Focal): | |
importance: | Undecided → Medium |
tags: | added: patch |
description: | updated |
Here is a debdiff with the patch for an SRU:
nauty (2.6r10+ ds-1ubuntu2) focal; urgency=medium
* debian/ patches/ upstream- biplabg. patch
- New patch; fix "sorry, this program doesn't support digraphs yet"
message when running nauty-biplabg (LP: #1903548).
-- Doug Torrance <email address hidden> Mon, 09 Nov 2020 13:17:32 -0500