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

mariadb SIGSEGV when built with -DCLIENT_PLUGIN_DIALOG=STATIC

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

          TomD Tom Donovan created issue -
          TomD Tom Donovan made changes -
          Field Original Value New Value
          Description If the dialog pluging is statically linked into the mariadb client app, it crashes when prompting for a password (-p),:
          {code:java}
          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
          {code}

          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 *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.
          If the dialog pluging is statically linked into the mariadb client app, it crashes when prompting for a password (-p),:
          {code:java}
          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
          {code}

          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.
          TomD Tom Donovan made changes -
          Description If the dialog pluging is statically linked into the mariadb client app, it crashes when prompting for a password (-p),:
          {code:java}
          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
          {code}

          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.
          If the dialog pluging is statically linked into the mariadb client app, it crashes when prompting for a password (-p),:
          {code:java}
          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
          {code}

          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.
          TomD Tom Donovan made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.0 [ 28320 ]
          serg Sergei Golubchik made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          serg Sergei Golubchik made changes -
          Status In Progress [ 3 ] In Testing [ 10301 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.4.31 [ 29010 ]
          Fix Version/s 10.5.22 [ 29011 ]
          Fix Version/s 10.6.15 [ 29013 ]
          Fix Version/s 10.9.8 [ 29015 ]
          Fix Version/s 10.10.6 [ 29017 ]
          Fix Version/s 10.11.5 [ 29019 ]
          Fix Version/s 11.0.3 [ 28920 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.0 [ 28320 ]
          Resolution Fixed [ 1 ]
          Status In Testing [ 10301 ] Closed [ 6 ]

          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.