Fix module loadex command crash due to invalid config (#13653)

Fix to https://github.com/redis/redis/issues/13650

providing an invalid config to a module with datatype crashes when redis
tries to unload the module due to the invalid config

---------

Co-authored-by: debing.sun <debing.sun@redis.com>
This commit is contained in:
nafraf
2025-04-22 10:16:24 +03:00
committed by YaacovHazan
co-authored by debing.sun
parent 2619411a4c
commit a96216bb9b
4 changed files with 23 additions and 6 deletions
+5
View File
@@ -1,6 +1,11 @@
set testmodule [file normalize tests/modules/datatype.so]
start_server {tags {"modules"}} {
test {DataType: test loadex with invalid config} {
catch { r module loadex $testmodule CONFIG invalid_config 1 } e
assert_match {*ERR Error loading the extension*} $e
}
r module load $testmodule
test {DataType: Test module is sane, GET/SET work.} {