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

"select 'a' 'b';" causes a leak.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 10.4.17
    • N/A
    • Server
    • None
    • Ubuntu 18.04

    Description

      I'm using the embedded library. Parsing the statement

      select 'a' 'b';
      

      causes the following report by ASAN.

      Direct leak of 144 byte(s) in 1 object(s) allocated from:
          #0 0x7f4948212b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
          #1 0x7f493e652f16 in my_malloc /home/buildbot/buildbot/build/mysys/my_malloc.c:101
          #2 0x7f493eb92c5f in Binary_string::realloc_raw(unsigned long) /home/buildbot/buildbot/build/sql/sql_string.cc:101
          #3 0x7f493eb93760 in Binary_string::realloc_with_extra(unsigned long) /home/buildbot/buildbot/build/sql/sql_string.h:634
          #4 0x7f493eb93760 in Binary_string::realloc_with_extra_if_needed(unsigned long) /home/buildbot/buildbot/build/sql/sql_string.h:646
          #5 0x7f493eb93760 in Binary_string::append(char const*, unsigned long) /home/buildbot/buildbot/build/sql/sql_string.h:535
          #6 0x7f493eb93760 in String::append(char const*, unsigned long) /home/buildbot/buildbot/build/sql/sql_string.cc:547
          #7 0x7f493e770335 in Item_string::append(char const*, unsigned int) /home/buildbot/buildbot/build/sql/item.h:4444
          #8 0x7f493e770335 in Item_string::make_string_literal_concat(THD*, st_mysql_const_lex_string const*) /home/buildbot/buildbot/build/sql/item.cc:6624
          #9 0x7f493eb57029 in MYSQLparse(THD*) /home/buildbot/buildbot/build/sql/sql_yacc.yy:15274
          #10 0x7f493e6604c4 in parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool) /home/buildbot/buildbot/build/sql/sql_parse.cc:10295
      ...
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            johan.wikman Johan Wikman
            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.