Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.4(EOL)
Description
Build with ASAN shows memory leak when calling binary `my_print_defaults` with non-existing configuration file
$ LSAN_OPTIONS=verbosity=1:log_threads=1 ./extra/my_print_defaults '--defaults-file=~/nofile.cnf' --mysqld mysql_install_db mariadb-install-db
|
==60009==AddressSanitizer: libc interceptors initialized
|
|| `[0x10007fff8000, 0x7fffffffffff]` || HighMem ||
|
|| `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||
|
|| `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap ||
|
|| `[0x00007fff8000, 0x00008fff6fff]` || LowShadow ||
|
|| `[0x000000000000, 0x00007fff7fff]` || LowMem ||
|
MemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff
|
redzone=16
|
max_redzone=2048
|
quarantine_size_mb=256M
|
thread_local_quarantine_size_kb=1024K
|
malloc_context_size=30
|
SHADOW_SCALE: 3
|
SHADOW_GRANULARITY: 8
|
SHADOW_OFFSET: 0x7fff8000
|
==60009==Installed the sigaction for signal 11
|
==60009==Installed the sigaction for signal 7
|
==60009==Installed the sigaction for signal 8
|
==60009==T0: stack [0x7ffe1d2b7000,0x7ffe1dab7000) size 0x800000; local=0x7ffe1dab4534
|
==60009==AddressSanitizer Init done
|
Could not open required defaults file: /home/anel/nofile.cnf
|
Fatal error in defaults handling. Program aborted
|
==60010==Processing thread 60009.
|
==60010==Stack at 0x7ffe1d2b7000-0x7ffe1dab7000 (SP = 0x7ffe1dab4128).
|
==60010==TLS at 0x7f40721ecbc0-0x7f40721edc80.
|
|
=================================================================
|
==60009==ERROR: LeakSanitizer: detected memory leaks
|
|
Direct leak of 120 byte(s) in 1 object(s) allocated from:
|
#0 0x7f407288a808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
|
#1 0x557a80bdc133 in my_malloc /home/anel/GitHub/mariadb/server/src/10.4/mysys/my_malloc.c:101
|
#2 0x557a80bbd8cb in main /home/anel/GitHub/mariadb/server/src/10.4/extra/my_print_defaults.c:174
|
#3 0x7f407221c082 in __libc_start_main ../csu/libc-start.c:308
|
#4 0x557a80bbd20d in _start (/home/anel/GitHub/mariadb/server/build/10.4/extra/my_print_defaults+0x7420d)
|
|
SUMMARY: AddressSanitizer: 120 byte(s) leaked in 1 allocation(s).
|
Aborted (core dumped)
|