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

connect.json fails with valgrind warnings

    Details

      Description

      perl ./mtr connect.json --valgrind-mysqld
      
      ==15874== Thread 4:
      ==15874== Conditional jump or move depends on uninitialised value(s)
      ==15874==    at 0x4C2D1EF: strcpy (mc_replace_strmem.c:443)
      ==15874==    by 0xCDB9495: AllocateValue(_global*, VALUE*, int, int) (value.cpp:447)
      ==15874==    by 0xCD94B65: JSONCOL::ParseJpath(_global*) (tabjson.cpp:543)
      ==15874==    by 0xCD939D0: TDBJSN::MakeCol(_global*, COLDEF*, COLBLK*, int) (tabjson.cpp:172)
      ==15874==    by 0xCD986C3: TDBASE::ColDB(_global*, char*, int) (table.cpp:246)
      ==15874==    by 0xCD46D03: CntOpenTable(_global*, TDB*, MODE, char*, char*, bool, ha_connect*) (connect.cc:280)
      ==15874==    by 0xCD35CEC: ha_connect::OpenTable(_global*, bool) (ha_connect.cc:1735)
      ==15874==    by 0xCD3B2B2: ha_connect::rnd_init(bool) (ha_connect.cc:3460)
      ==15874==    by 0x5F11C2: handler::ha_rnd_init(bool) (handler.h:2626)
      ==15874==    by 0x85E280: handler::ha_rnd_init_with_error(bool) (handler.cc:2711)
      ==15874==    by 0x99201E: init_read_record(READ_RECORD*, THD*, TABLE*, SQL_SELECT*, int, bool, bool) (records.cc:278)
      ==15874==    by 0x6C049E: join_init_read_record(st_join_table*) (sql_select.cc:18665)
      ==15874==    by 0x6BE500: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:17775)
      ==15874==    by 0x6BDDE2: do_select(JOIN*, List<Item>*, TABLE*, Procedure*) (sql_select.cc:17440)
      ==15874==    by 0x69984D: JOIN::exec_inner() (sql_select.cc:3081)
      ==15874==    by 0x696AED: JOIN::exec() (sql_select.cc:2370)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              bertrandop Olivier Bertrand added a comment - - edited

              The problem was not in AllocateValue but in the constructor of TYPVAL<PSZ> The new strg was widely uninitialised just by setting a terminated null char. Now the whole string is zero'ed.

              Show
              bertrandop Olivier Bertrand added a comment - - edited The problem was not in AllocateValue but in the constructor of TYPVAL<PSZ> The new strg was widely uninitialised just by setting a terminated null char. Now the whole string is zero'ed.
              Hide
              elenst Elena Stepanova added a comment -

              Updated fix version, apparently the fix didn't make it to 10.0.16.

              Show
              elenst Elena Stepanova added a comment - Updated fix version, apparently the fix didn't make it to 10.0.16.
              Hide
              bertrandop Olivier Bertrand added a comment -

              Indeed, fix version will be 10.0.17 as said above.

              Show
              bertrandop Olivier Bertrand added a comment - Indeed, fix version will be 10.0.17 as said above.

                People

                • Assignee:
                  bertrandop Olivier Bertrand
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 0 minutes
                    0m
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 3 hours
                    3h