diff --git a/nauty-fall-off.patch b/nauty-fall-off.patch new file mode 100644 index 0000000..4014fe2 --- /dev/null +++ b/nauty-fall-off.patch @@ -0,0 +1,13 @@ +--- a/checks6.c 2021-09-03 01:29:06.000000000 -0600 ++++ b/checks6.c 2022-07-01 10:09:33.329041028 -0600 +@@ -118,9 +118,8 @@ seemsbad(char *s) + *p++ = BIAS6 + ((x << k) | ((1 << (k-1)) - 1)); + return TRUE; + } +- else +- return FALSE; + } ++ return FALSE; + } + + /***********************************************************************/ diff --git a/nauty-noreturn.patch b/nauty-noreturn.patch new file mode 100644 index 0000000..ebc5223 --- /dev/null +++ b/nauty-noreturn.patch @@ -0,0 +1,33 @@ +--- a/gtools.h 2021-09-03 04:19:20.000000000 -0600 ++++ b/gtools.h 2022-07-01 10:22:31.451579384 -0600 +@@ -273,7 +273,7 @@ extern void arg_sequence(char**,char*,lo + extern void arg_sequence_min(char**,char*,long*,int,int,int*,char*); + + extern void writerange(FILE*,int,long,long); +-extern void gt_abort(const char*); ++extern void gt_abort(const char*) __attribute__((noreturn)); + extern char *stringcopy(char*); + extern boolean strhaschar(char*,int); + +--- a/nauty.h 2021-09-03 04:19:53.000000000 -0600 ++++ b/nauty.h 2022-07-01 10:21:58.819514878 -0600 +@@ -1336,7 +1336,7 @@ int leftbit[] = {8,7,6,6,5,5,5,5,4,4,4 + extern "C" { + #endif + +-extern void alloc_error(const char*); ++extern void alloc_error(const char*) __attribute__((noreturn)); + extern void breakout(int*,int*,int,int,int,set*,int); + extern boolean cheapautom(int*,int,boolean,int); + extern void doref(graph*,int*,int*,int,int*,int*,int*,set*,int*, +--- a/showg.c 2022-01-27 15:24:09.078428828 -0700 ++++ b/showg.c 2022-07-01 10:22:53.852623673 -0600 +@@ -216,7 +216,7 @@ static long ogf_linelen; + + /************************************************************************/ + +-static void ++static void __attribute__((noreturn)) + gt_abort(char *msg) /* Write message and halt. */ + { + if (msg) fprintf(stderr,"%s",msg); diff --git a/nauty-uninitialized.patch b/nauty-uninitialized.patch index 7b21f58..33d826a 100644 --- a/nauty-uninitialized.patch +++ b/nauty-uninitialized.patch @@ -9,8 +9,8 @@ char *arg,sw,ochar; boolean badargs; boolean nswitch,sswitch,gswitch,hswitch,qswitch; ---- a/complg.c 2022-01-27 14:48:51.481846888 -0700 -+++ b/complg.c 2022-01-27 15:07:10.324101957 -0700 +--- a/complg.c 2022-07-01 09:54:01.745372288 -0600 ++++ b/complg.c 2022-07-01 09:54:27.297417489 -0600 @@ -74,7 +74,7 @@ main(int argc, char *argv[]) int j,m,n,argnum; int codetype,outcode; @@ -55,8 +55,8 @@ HELP; PUTVERSION; ---- a/genbg.c 2022-01-27 14:48:51.496846904 -0700 -+++ b/genbg.c 2022-01-27 15:12:30.389485368 -0700 +--- a/genbg.c 2022-07-01 09:54:01.746372290 -0600 ++++ b/genbg.c 2022-07-01 09:54:27.298417491 -0600 @@ -1192,7 +1192,7 @@ genextend(graph *g, int n2, int *deg, in graph gx[MAXN]; int degx[MAXN]; @@ -66,8 +66,8 @@ #ifdef INSTRUMENT boolean haschild; ---- a/genquarticg.c 2022-01-27 14:48:51.497846905 -0700 -+++ b/genquarticg.c 2022-01-27 15:21:33.366207213 -0700 +--- a/genquarticg.c 2022-07-01 09:54:01.747372292 -0600 ++++ b/genquarticg.c 2022-07-01 09:54:27.298417491 -0600 @@ -230,8 +230,8 @@ STATIC_POPCNTFUNC(void,extend, (int n, graph *g, edgestruct *edge, pairstruct *epair, int numpair, int *epairorbit, int *multar, setword *zar, int *col00w, boolean connectflag), @@ -88,8 +88,8 @@ ///////////////////////////////////////////////////////////////////////// if( n == splitlevel ) ---- a/genrang.c 2022-01-27 14:48:34.277828907 -0700 -+++ b/genrang.c 2022-01-27 15:13:13.772537840 -0700 +--- a/genrang.c 2022-07-01 09:53:47.826347665 -0600 ++++ b/genrang.c 2022-07-01 09:54:27.299417493 -0600 @@ -972,7 +972,7 @@ main(int argc, char *argv[]) static FILE *outfile; char *outfilename; @@ -99,6 +99,17 @@ #if MAXN graph g[MAXM*1L*MAXN]; +--- a/gtnauty.c 2022-07-01 09:53:41.721336867 -0600 ++++ b/gtnauty.c 2022-07-01 09:57:22.464727317 -0600 +@@ -644,7 +644,7 @@ istransitive(graph *g, int m, int n, gra + int i,inv; + set *gw; + short wt; +- int d,inv0,v,w; ++ int d,inv0=0,v,w; + statsblk stats; + static DEFAULTOPTIONS_GRAPH(options); + #if MAXN --- a/gtools.c 2021-09-03 01:29:06.000000000 -0600 +++ b/gtools.c 2022-01-27 15:05:27.364985818 -0700 @@ -404,8 +404,8 @@ char* @@ -157,8 +168,8 @@ int *d,*e; size_t *v; int loops; ---- a/gutil1.c 2022-01-27 14:48:51.504846912 -0700 -+++ b/gutil1.c 2022-01-27 15:11:35.084418476 -0700 +--- a/gutil1.c 2022-07-01 09:54:01.747372292 -0600 ++++ b/gutil1.c 2022-07-01 09:54:27.299417493 -0600 @@ -163,7 +163,9 @@ POPCNTFUNC(void,degstats2, return; } @@ -170,8 +181,8 @@ if (digraph) { DYNALLOC1(int,indeg,indeg_sz,n,"degstats2"); ---- a/gutil2.c 2022-01-27 14:48:51.517846926 -0700 -+++ b/gutil2.c 2022-01-27 15:05:57.316019608 -0700 +--- a/gutil2.c 2022-07-01 09:54:01.748372293 -0600 ++++ b/gutil2.c 2022-07-01 09:54:27.300417494 -0600 @@ -352,7 +352,7 @@ POPCNTFUNC(int,conncontent,(graph *g, in graph h[WORDSIZE]; setword gj; @@ -200,8 +211,8 @@ nauty_counter nin,nout,nNO,nYES,nTIMEOUT; int status; DYNALLSTAT(int,cyc,cyc_sz); ---- a/labelg.c 2022-01-27 14:48:27.491821814 -0700 -+++ b/labelg.c 2022-01-27 15:19:55.446067843 -0700 +--- a/labelg.c 2022-07-01 09:53:41.720336865 -0600 ++++ b/labelg.c 2022-07-01 09:54:27.300417494 -0600 @@ -99,14 +99,14 @@ main(int argc, char *argv[]) sparsegraph sg,sh; int m,n,codetype; @@ -239,8 +250,8 @@ sortlists_sg(g); SG_VDE(g,gv,gd,ge); ---- a/listg.c 2022-01-27 14:48:51.529846938 -0700 -+++ b/listg.c 2022-01-27 15:21:47.262226991 -0700 +--- a/listg.c 2022-07-01 09:54:01.748372293 -0600 ++++ b/listg.c 2022-07-01 09:54:27.301417496 -0600 @@ -522,7 +522,7 @@ main(int argc, char *argv[]) boolean sswitch,Mswitch,Wswitch,Lswitch,Eswitch; boolean bswitch,Gswitch,yswitch,Yswitch,Hswitch; @@ -250,8 +261,19 @@ HELP; PUTVERSION; ---- a/naugraph.c 2022-01-27 14:48:51.557846967 -0700 -+++ b/naugraph.c 2022-01-27 15:02:35.827787094 -0700 +--- a/multig.c 2022-07-01 09:54:01.748372293 -0600 ++++ b/multig.c 2022-07-01 09:58:57.535895472 -0600 +@@ -896,7 +896,7 @@ main(int argc, char *argv[]) + { + graph *g; + graph gg[MAXNV*SETWORDSNEEDED(MAXNV)]; +- int i,m,n,ne,codetype; ++ int i,m,n,ne=0,codetype; + int argnum,j,nfixed,maxdeg,regdeg,ldeg; + char *arg,sw; + boolean badargs; +--- a/naugraph.c 2022-07-01 09:54:01.749372295 -0600 ++++ b/naugraph.c 2022-07-01 09:54:27.301417496 -0600 @@ -192,7 +192,7 @@ POPCNTFUNC(void,refine,(graph *g, int *l int cnt,bmin,bmax; long longcode; @@ -270,8 +292,8 @@ DEF_DYNINT(workperm,n,"refine1"); DEF_DYNINT(bucket,n+2,"refine1"); ---- a/nautinv.c 2022-01-27 14:48:51.579846990 -0700 -+++ b/nautinv.c 2022-01-27 15:06:53.684083192 -0700 +--- a/nautinv.c 2022-07-01 09:54:01.749372295 -0600 ++++ b/nautinv.c 2022-07-01 09:54:27.301417496 -0600 @@ -1575,7 +1575,7 @@ STATIC_POPCNTFUNC(int,semirefine, int cnt,bmin,bmax; long longcode; @@ -304,7 +326,7 @@ boolean badargs; boolean verbose,nonplanar,quiet; --- a/planarity.c 2021-09-03 01:29:06.000000000 -0600 -+++ b/planarity.c 2022-01-27 15:08:13.333174408 -0700 ++++ b/planarity.c 2022-07-01 09:56:29.065632875 -0600 @@ -803,7 +803,7 @@ sparseg_adjl_remove_dir_edge_no_red (t_v A will be left with "holes" */ @@ -323,6 +345,15 @@ boolean set_next; IF_DEB( +@@ -7552,7 +7552,7 @@ sparseg_adjl_dfs_preprocessing ( + according to their lowpoint value + */ + lowpoint_order = (int *) mem_malloc(sizeof(int) * n); +- temp = (t_dlcl **) mem_malloc(sizeof(t_dlcl *) * n); ++ temp = (t_dlcl **) calloc(sizeof(t_dlcl *), n); + new_dfs_tree = (t_dlcl **) mem_malloc(sizeof(t_dlcl *) * n); + + /* --- a/schreier.c 2021-09-03 01:29:06.000000000 -0600 +++ b/schreier.c 2022-01-27 15:00:52.084661084 -0700 @@ -558,7 +558,7 @@ filterschreier(schreier *gp, int *p, per diff --git a/nauty.spec b/nauty.spec index 92b0b45..0811746 100644 --- a/nauty.spec +++ b/nauty.spec @@ -1,9 +1,9 @@ -%global nautybasever 2.7r3 +%global nautybasever 2.7r4 %global nautytarver %(tr -d . <<< %{nautybasever}) Name: nauty Version: %(tr r . <<< %{nautybasever}) -Release: 2%{?dist} +Release: 1%{?dist} Summary: Graph canonical labeling and automorphism group computation License: ASL 2.0 @@ -30,6 +30,10 @@ Patch7: %{name}-unbundle-cliquer.patch Patch8: %{name}-format.patch # Fix uninitialized variable warnings Patch9: %{name}-uninitialized.patch +# Fix a function that can fall off the end +Patch10: %{name}-fall-off.patch +# Mark functions as noreturn to improve compiler diagnostics +Patch11: %{name}-noreturn.patch BuildRequires: cliquer-devel BuildRequires: gcc @@ -114,6 +118,10 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ # We do not want the libtool archives rm %{buildroot}%{_libdir}/*.la +# Link identical executables +rm %{buildroot}%{_bindir}/nauty-pickg +ln -s nauty-countg %{buildroot}%{_bindir}/nauty-pickg + %check LD_LIBRARY_PATH=$PWD/.libs make check @@ -136,6 +144,10 @@ LD_LIBRARY_PATH=$PWD/.libs make check %{_libdir}/pkgconfig/%{name}.pc %changelog +* Fri Jul 1 2022 Jerry James - 2.7.4-1 +- Version 2.7r4 +- Add -fall-off and -noreturn patches + * Thu Jan 27 2022 Jerry James - 2.7.3-2 - Disable popcnt support on i386 due to test failures - Add -format and -uninitialized patches diff --git a/sources b/sources index f7b8560..5906fa5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nauty27r3.tar.gz) = 8d6d92de8d348d3874677a55773088f4ff5b9a45fd9ed3802c9b1590072f5861946ac1d21892f4b383a9e36f6c9ac08270d021429cf36da3e5038e6a38d9fb6c +SHA512 (nauty27r4.tar.gz) = 2ed691bf0a6806f77cccbd95ee7687a66b6e6342493a0d65636166727cf4ea8cd887187d88a3154d911f665deb8d6f5bbaba33c8a1b740a564a1fc52bf4b4520