Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
11.0.2
-
Debian GNU/Linux 12 (bookworm) x86_64
gcc (Debian 12.2.0-14) 12.2.0 cmake version 3.25.1
Description
If the dialog pluging is statically linked into the mariadb client app, it crashes when prompting for a password (-p),:
Program received signal SIGSEGV, Segmentation fault.
|
__memset_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:252 |
252 ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: No such file or directory. |
(gdb) where
|
#0 __memset_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:252 |
#1 0x00005555555d017e in get_password (file=0x555555b1a220, buffer=0x5555556addaf "my_strdup", length=-6240) |
at /home/tomd/mariadb/mariadb-11.0.2/libmariadb/libmariadb/get_password.c:59 |
#2 0x00005555555d0372 in get_tty_password (prompt=0x0, buffer=0x5555556addaf "my_strdup", length=-6240) |
at /home/tomd/mariadb/mariadb-11.0.2/libmariadb/libmariadb/get_password.c:162 |
#3 0x00005555555c03da in get_options (argc=1, argv=0x555555b19f90) |
at /home/tomd/mariadb/mariadb-11.0.2/client/mysql.cc:2138 |
#4 0x00005555555bebec in main (argc=7, argv=0x555555b19f88) |
at /home/tomd/mariadb/mariadb-11.0.2/client/mysql.cc:1267 |
libmariadb/plugins/auth/dialog.c calls get_tty_password with three arguments, intending the 3-argument function in libmariadb/libmariadb/get_password.c.
When statically linked, the identically named function in mysys/get_password.c apparently causes the problem.
If the get_tty_password function is renamed in both libmariadb/plugins/auth/dialog.c and libmariadb/libmariadb/get_password.c, the mariadb client works correctly.