Merge pull request #377 from madsys-dev/fix-offset-overflow

IOR: fix overflow in offset calculations
master
Julian Kunkel 2021-05-30 15:35:21 +02:00 committed by GitHub
commit 1d4c68a30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1679,7 +1679,7 @@ static void prefillSegment(IOR_param_t *test, void * randomPrefillBuffer, int pr
IOR_offset_t transferCount;
int errors;
ioBuffers->buffer = randomPrefillBuffer;
for (int i = startSegment; i < endSegment; i++){
for (IOR_offset_t i = startSegment; i < endSegment; i++){
for (int j = 0; j < offsets; j++) {
IOR_offset_t offset = j * test->randomPrefillBlocksize;
if (test->filePerProc) {
@ -1707,7 +1707,7 @@ static IOR_offset_t WriteOrRead(IOR_param_t *test, IOR_results_t *results,
IOR_offset_t dataMoved = 0; /* for data rate calculation */
double startForStonewall;
int hitStonewall;
int i, j;
IOR_offset_t i, j;
IOR_point_t *point = ((access == WRITE) || (access == WRITECHECK)) ?
&results->write : &results->read;