Skip to content

Commit

Permalink
Fix overflow when calling parsec_data_create
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinglei Cao committed May 3, 2024
1 parent 74d9dcd commit f5d6311
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion parsec/data_dist/matrix/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void parsec_tiled_matrix_init( parsec_tiled_matrix_t *tdesc,
tdesc->tileld = (storage == PARSEC_MATRIX_TILE) ? mb : lm;
tdesc->mb = mb;
tdesc->nb = nb;
tdesc->bsiz = mb * nb;
tdesc->bsiz = (size_t)mb * nb;

/* Large matrix parameters */
tdesc->lm = lm;
Expand Down
2 changes: 1 addition & 1 deletion parsec/data_dist/matrix/matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ typedef struct parsec_tiled_matrix_s {
int tileld; /**< leading dimension of each tile (Should be a function depending on the row) */
int mb; /**< number of rows in a tile */
int nb; /**< number of columns in a tile */
int bsiz; /**< size in elements including padding of a tile - derived parameter */
size_t bsiz; /**< size in elements including padding of a tile - derived parameter */
int lm; /**< number of rows of the entire matrix */
int ln; /**< number of columns of the entire matrix */
int lmt; /**< number of tile rows of the entire matrix - derived parameter */
Expand Down

0 comments on commit f5d6311

Please sign in to comment.