Skip to content

Commit

Permalink
vendor: Update vendored sources to igraph/igraph@b25eda2
Browse files Browse the repository at this point in the history
fix: UBSan warning about negative shift when generating Q_0 hypercube graph
  • Loading branch information
krlmlr committed Jan 6, 2025
1 parent ca3bdd2 commit ef99925
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vendor/cigraph/src/constructors/regular.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ igraph_error_t igraph_hypercube(igraph_t *graph,
/* Integer overflow is no longer a concern after the above check. */

const igraph_integer_t vcount = (igraph_integer_t) 1 << n;
const igraph_integer_t ecount = ((igraph_integer_t) 1 << (n-1)) * n;
const igraph_integer_t ecount = n > 0 ? ((igraph_integer_t) 1 << (n-1)) * n : 0; /* avoid UBSan warning */
igraph_vector_int_t edges;
igraph_integer_t p;
int iter = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/vendor/igraph_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

__BEGIN_DECLS

#define IGRAPH_VERSION "0.10.15-42-ge940ab737"
#define IGRAPH_VERSION "0.10.15-43-gb25eda2db"
#define IGRAPH_VERSION_MAJOR 0
#define IGRAPH_VERSION_MINOR 10
#define IGRAPH_VERSION_PATCH 15
#define IGRAPH_VERSION_PRERELEASE "42-ge940ab737"
#define IGRAPH_VERSION_PRERELEASE "43-gb25eda2db"

IGRAPH_EXPORT void igraph_version(const char **version_string,
int *major,
Expand Down

0 comments on commit ef99925

Please sign in to comment.