[MDEV-7879] connect.json fails with valgrind warnings #2 Created: 2015-03-30  Updated: 2015-03-30  Resolved: 2015-03-30

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.0.18

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Olivier Bertrand
Resolution: Fixed Votes: 0
Labels: verified

Issue Links:
Blocks
blocks MDEV-7069 Fix buildbot failures in main server ... Stalled

 Description   

Note: It's different from MDEV-7498, and besides MDEV-7498 has been already closed anyway.

$ perl ./mtr connect.json --valgrind-mysqld
...
==30673== Thread 4:
==30673== Source and destination overlap in strncpy(0xe1e9f3d, 0xe1e9f3d, 15)
==30673==    at 0x4C2A462: __GI_strncpy (vg_replace_strmem.c:494)
==30673==    by 0xCD68BB3: TYPVAL<char*>::SetValue_pval(VALUE*, bool) (value.cpp:1328)
==30673==    by 0xCD4286B: JSONCOL::ReadColumn(_global*) (tabjson.cpp:633)
==30673==    by 0xCCFF97D: COLBLK::Eval(_global*) (colblk.cpp:140)
==30673==    by 0xCCF38C3: EvalColumns(_global*, TDB*, bool, bool) (connect.cc:421)
==30673==    by 0xCCF3AE3: CntReadNext(_global*, TDB*) (connect.cc:473)
==30673==    by 0xCCE78DC: ha_connect::rnd_next(unsigned char*) (ha_connect.cc:3645)
==30673==    by 0x86FDBF: handler::ha_rnd_next(unsigned char*) (handler.cc:2556)
==30673==    by 0x99EEB8: rr_sequential(READ_RECORD*) (records.cc:466)
==30673==    by 0x6DDF9B: join_init_read_record(st_join_table*) (sql_select.cc:18694)
==30673==    by 0x6DBF11: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:17801)
==30673==    by 0x6DB7D8: do_select(JOIN*, List<Item>*, TABLE*, Procedure*) (sql_select.cc:17466)
==30673==    by 0x6B8C52: JOIN::exec_inner() (sql_select.cc:3081)
==30673==    by 0x6B6167: JOIN::exec() (sql_select.cc:2370)
==30673==    by 0x6B94FC: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3310)
==30673==    by 0x6AFACC: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==30673== Source and destination overlap in strncpy(0xe1ea6af, 0xe1ea6af, 128)
==30673==    at 0x4C2A462: __GI_strncpy (vg_replace_strmem.c:494)
==30673==    by 0xCD68BB3: TYPVAL<char*>::SetValue_pval(VALUE*, bool) (value.cpp:1328)
==30673==    by 0xCD42647: JSONCOL::SetJsonValue(_global*, VALUE*, JVALUE*, int) (tabjson.cpp:600)
==30673==    by 0xCD42F8A: JSONCOL::ExpandArray(_global*, JARRAY*, int) (tabjson.cpp:736)
==30673==    by 0xCD42B7F: JSONCOL::GetColumnValue(_global*, JSON*, int) (tabjson.cpp:674)
==30673==    by 0xCD42853: JSONCOL::ReadColumn(_global*) (tabjson.cpp:633)
==30673==    by 0xCCFF97D: COLBLK::Eval(_global*) (colblk.cpp:140)
==30673==    by 0xCCF38C3: EvalColumns(_global*, TDB*, bool, bool) (connect.cc:421)
==30673==    by 0xCCF3AE3: CntReadNext(_global*, TDB*) (connect.cc:473)
==30673==    by 0xCCE78DC: ha_connect::rnd_next(unsigned char*) (ha_connect.cc:3645)
==30673==    by 0x86FDBF: handler::ha_rnd_next(unsigned char*) (handler.cc:2556)
==30673==    by 0x99EEB8: rr_sequential(READ_RECORD*) (records.cc:466)
==30673==    by 0x6DDF9B: join_init_read_record(st_join_table*) (sql_select.cc:18694)
==30673==    by 0x6DBF11: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:17801)
==30673==    by 0x6DB7D8: do_select(JOIN*, List<Item>*, TABLE*, Procedure*) (sql_select.cc:17466)
==30673==    by 0x6B8C52: JOIN::exec_inner() (sql_select.cc:3081)

Also fails in buildbot: http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/6987/steps/test/logs/stdio



 Comments   
Comment by Olivier Bertrand [ 2015-03-30 ]

The function SetValue_pval could be called with the target value equal to the source one.

Generated at Thu Feb 08 07:22:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.