Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31461

mariadb SIGSEGV when built with -DCLIENT_PLUGIN_DIALOG=STATIC

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            TomD Tom Donovan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.