Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-518

mthd_my_real_connect() crashes on connection error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.9
    • Fix Version/s: 3.1.12, 3.2.0
    • Component/s: None
    • Labels:
    • Environment:
      Microsoft Windows Server 2019 Standard

      Description

      Unhandled exception thrown: read access violation.

      The crash happens here:
      https://github.com/mariadb-corporation/mariadb-connector-c/blob/v3.1.9/libmariadb/mariadb_lib.c#L1704

      error:
        /* Free alloced memory */
        end_server(mysql);
        /* only free the allocated memory, user needs to call mysql_close */
        mysql_close_memory(mysql);
        if (!(client_flag & CLIENT_REMEMBER_OPTIONS) &&
            !mysql->options.extension->async_context)    <--- mysql->options.extension was nullptr
          mysql_close_options(mysql);
        return(0);
      

      Call stack:

      libmariadb!mthd_my_real_connect+0x858 [libmariadb\mariadb_lib.c @ 1703] 
      libmariadb!mysql_real_connect+0x24a [libmariadb\mariadb_lib.c @ 1330] 
      

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            skvoboo Anton Serbulov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration