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

Invalid read of size 8 in Type_aggregator::Type_aggregator()

    XMLWordPrintable

Details

    Description

      This problem shows up in bb-10.3-ext and 10.3 branches when compiled with SAFEMALLOC:

      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      tokudb.type_blob                         [ fail ]  Found warnings/errors in server log file!
              Test ended at 2017-03-23 12:21:56
      line
      ==26565== Invalid read of size 8
      ==26565==    at 0x1181186: my_thread_dbug_id (my_thr_init.c:403)
      ==26565==    by 0x1190A22: default_sf_malloc_dbug_id (safemalloc.c:91)
      ==26565==    by 0x1190AD2: sf_malloc (safemalloc.c:132)
      ==26565==    by 0x117D0ED: my_malloc (my_malloc.c:101)
      ==26565==    by 0x1155992: init_dynamic_array2 (array.c:70)
      ==26565==    by 0x8B371E: Dynamic_array<Type_aggregator::Pair>::init(unsigned int, unsigned int) (sql_array.h:126)
      ==26565==    by 0x8B35CF: Dynamic_array<Type_aggregator::Pair>::Dynamic_array(unsigned int, unsigned int) (sql_array.h:114)
      ==26565==    by 0x8B0DA5: Type_aggregator::Type_aggregator() (sql_type.h:1434)
      ==26565==    by 0x8AEC0A: __static_initialization_and_destruction_0(int, int) (sql_type.cc:59)
      ==26565==    by 0x8AEFBE: _GLOBAL__sub_I_sql_type.cc (sql_type.cc:2214)
      ==26565==    by 0x11EAF8C: __libc_csu_init (elf-init.c:88)
      ==26565==    by 0x6ED6A94: (below main) (in /lib64/libc-2.19.so)
      ==26565==  Address 0x7273b20 is 16 bytes inside a block of size 33 free'd
      ==26565==    at 0x4C2A42C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==26565==    by 0x6179C87: ??? (in /lib64/libcrypto.so.1.0.0)
      ==26565==    by 0x6179D55: ??? (in /lib64/libcrypto.so.1.0.0)
      ==26565==    by 0x617A293: FIPS_module_mode_set (in /lib64/libcrypto.so.1.0.0)
      ==26565==    by 0x605F97B: FIPS_mode_set (in /lib64/libcrypto.so.1.0.0)
      ==26565==    by 0x605BF9F: OPENSSL_init_library (in /lib64/libcrypto.so.1.0.0)
      ==26565==    by 0x400E8E9: call_init.part.0 (in /lib64/ld-2.19.so)
      ==26565==    by 0x400E9D2: _dl_init (in /lib64/ld-2.19.so)
      ==26565==    by 0x40011C9: ??? (in /lib64/ld-2.19.so)
      ==26565==    by 0xA: ???
      ==26565==    by 0xFFEFFDE96: ???
      ==26565==    by 0xFFEFFDEB5: ???
      ==26565==    by 0xFFEFFDED0: ???
      ==26565==    by 0xFFEFFDF0A: ???
      ==26565==    by 0xFFEFFDF1C: ???
      ==26565==    by 0xFFEFFDF25: ???
      ^ Found warnings in /home/my/maria-10.3/mysql-test/var/log/mysqld.1.err
      ok
      

      The problem is that Type_aggregator::Type_aggregator() is called before safemalloc is initialized in mysqld.cc.

      The problem was introduced by:
      MDEV-11478 Result data type aggregation for pluggable data types

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.