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

mthd_my_real_connect() crashes on connection error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 3.1.9
    • 3.2.0, 3.1.12
    • None
    • 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

            georg Georg Richter
            skvoboo Anton Serbulov
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.