Commit 57f6a1c
committed
MDEV-19415: use-after-free on charsets_dir from slave connect
The slave IO thread sets MYSQL_SET_CHARSET_DIR. The code for this option however is not thread-safe in sql-common/client.c. The value set is temporarily written to mysys global variable `charsets-dir` and can be seen by other threads running in parallel, which can result in use-after-free error. Problem was visible as random failures of test cases in suite multi_source with Valgrind or MSAN. Work-around by not setting this option for slave connect, it is redundant anyway as it is just setting the default value. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>1 parent 0c249ad commit 57f6a1c
1 file changed
+0
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7412 | 7412 | | |
7413 | 7413 | | |
7414 | 7414 | | |
7415 | | - | |
7416 | | - | |
7417 | | - | |
7418 | 7415 | | |
7419 | 7416 | | |
7420 | 7417 | | |
| |||
7557 | 7554 | | |
7558 | 7555 | | |
7559 | 7556 | | |
7560 | | - | |
7561 | | - | |
7562 | 7557 | | |
7563 | 7558 | | |
7564 | 7559 | | |
| |||
0 commit comments