Fix uninitializeed RMConfigIterator::is_glob causing MSan warnings (#14171)
CI / test-ubuntu-latest (push) Waiting to run Details
CI / test-sanitizer-address (push) Waiting to run Details
CI / build-debian-old (push) Waiting to run Details
CI / build-macos-latest (push) Waiting to run Details
CI / build-32bit (push) Waiting to run Details
CI / build-libc-malloc (push) Waiting to run Details
CI / build-centos-jemalloc (push) Waiting to run Details
CI / build-old-chain-jemalloc (push) Waiting to run Details
Codecov / code-coverage (push) Waiting to run Details
External Server Tests / test-external-standalone (push) Waiting to run Details
External Server Tests / test-external-cluster (push) Waiting to run Details
External Server Tests / test-external-nodebug (push) Waiting to run Details
Spellcheck / Spellcheck (push) Waiting to run Details

Recent [PR](https://github.com/redis/redis/pull/14051) causes MSan to
fail during daily CI with uninitialized value warning.
It is not a bug per se as the uninitialized member is dependent on
another member not being NULL.
With this PR now MSan does not complain.
This commit is contained in:
Mincho Paskalev 2025-07-04 12:26:24 +03:00 committed by GitHub
parent 15706f2e82
commit eb9337abf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -13607,9 +13607,11 @@ RedisModuleConfigIterator *RM_ConfigIteratorCreate(RedisModuleCtx *ctx, const ch
if (pattern != NULL) {
iter->pattern = sdsnew(pattern);
iter->is_glob = (strpbrk(pattern, "*?[") != NULL);
} else
} else {
iter->pattern = NULL;
iter->is_glob = false;
}
if (ctx != NULL) autoMemoryAdd(ctx,REDISMODULE_AM_CONFIG, iter);
return iter;
}