sanja asked me if MemorySanitizer (MDEV-20377) is usable on clang-17. I had previously mostly used it on clang-15, so I tried a clang-16 build of 10.6 and accidentally found a bug that does not appear to be caught by older versions of the compiler:
MSAN_OPTIONS=abort_on_error=1:MSAN_OPTIONS=poison_in_dtor=0 LD_LIBRARY_PATH=~/libmsan-16 MSAN_SYMBOLIZER_PATH=~/bin/llvm-symbolizer-msan ./mtr main.pool_of_threads
|
10.6 53c6c823dc7cafefffdc93c79661cfb146ff8641
|
main.pool_of_threads [ fail ]
|
Test ended at 2024-02-16 16:01:09
|
|
CURRENT_TEST: main.pool_of_threads
|
mysqltest: In included file "./include/common-tests.inc":
|
included from /mariadb/10.6/mysql-test/main/pool_of_threads.test at line 17:
|
At line 1254: query 'select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"' failed: <Unknown> (2013): Lost connection to server during query
|
…
|
Version: '10.6.18-MariaDB-debug-log' socket: '/dev/shm/10.6msan/mysql-test/var/tmp/mysqld.1.sock' port: 16000 Source distribution
|
==981332==WARNING: MemorySanitizer: use-of-uninitialized-value
|
#0 0x55fd598bfae1 in Item_func::not_null_tables() const /mariadb/10.6/sql/item_func.cc:624:3
|
#1 0x55fd597e82d6 in Item_cond::eval_not_null_tables(void*) /mariadb/10.6/sql/item_cmpfunc.cc:5187:38
|
#2 0x55fd597e7707 in Item_cond::fix_fields(THD*, Item**) /mariadb/10.6/sql/item_cmpfunc.cc:5078:10
|
#3 0x55fd5a24ce1b in make_cond_for_table_from_pred(THD*, Item*, Item*, unsigned long long, unsigned long long, int, bool, bool, bool) /mariadb/10.6/sql/sql_select.cc:23938:16
|
#4 0x55fd5a17e543 in make_cond_for_table(THD*, Item*, unsigned long long, unsigned long long, int, bool, bool) /mariadb/10.6/sql/sql_select.cc:23866:10
|
#5 0x55fd5a17e543 in make_join_select(JOIN*, SQL_SELECT*, Item*) /mariadb/10.6/sql/sql_select.cc:12543:16
|
#6 0x55fd5a1563f0 in JOIN::optimize_stage2() /mariadb/10.6/sql/sql_select.cc:2855:7
|
#7 0x55fd5a15f3e1 in JOIN::optimize_inner() /mariadb/10.6/sql/sql_select.cc:2590:9
|
#8 0x55fd5a153b70 in JOIN::optimize() /mariadb/10.6/sql/sql_select.cc:1888:10
|
#9 0x55fd5a13c232 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /mariadb/10.6/sql/sql_select.cc:5127:19
|
#10 0x55fd5a13bc9d in handle_select(THD*, LEX*, select_result*, unsigned long) /mariadb/10.6/sql/sql_select.cc:559:10
|
#11 0x55fd5a078ff3 in execute_sqlcom_select(THD*, TABLE_LIST*) /mariadb/10.6/sql/sql_parse.cc:6376:12
|
#12 0x55fd5a0636ce in mysql_execute_command(THD*, bool) /mariadb/10.6/sql/sql_parse.cc:3980:12
|
#13 0x55fd5a053c60 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /mariadb/10.6/sql/sql_parse.cc:8143:18
|
#14 0x55fd5a04cc0c in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /mariadb/10.6/sql/sql_parse.cc:1896:7
|
#15 0x55fd5a054531 in do_command(THD*, bool) /mariadb/10.6/sql/sql_parse.cc:1409:17
|
#16 0x55fd5a7f7c26 in threadpool_process_request(THD*) /mariadb/10.6/sql/threadpool_common.cc:435:13
|
#17 0x55fd5a7f7c26 in tp_callback(TP_connection*) /mariadb/10.6/sql/threadpool_common.cc:249:12
|
#18 0x55fd5a7ffd45 in worker_main(void*) /mariadb/10.6/sql/threadpool_generic.cc:1556:5
|
#19 0x7f01e9dd045b in start_thread nptl/pthread_create.c:444:8
|
#20 0x7f01e9e50bbb in clone3 misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
|
Memory was marked as uninitialized
|
#0 0x55fd595d3db1 in __msan_allocated_memory (/dev/shm/10.6msan/sql/mariadbd+0xf26db1) (BuildId: a8f73f07e16a2953)
|
#1 0x55fd5b5e2d85 in my_malloc /mariadb/10.6/mysys/my_malloc.c:114:7
|
I checked this with rr, and indeed the memory is straight from TRASH_ALLOC():
10.6 53c6c823dc7cafefffdc93c79661cfb146ff8641
|
#3 0x000055c7785aed86 in my_malloc (key=<optimized out>, size=<optimized out>, size@entry=576, my_flags=<optimized out>) at /mariadb/10.6/mysys/my_malloc.c:114
|
#4 0x000055c7785925e0 in alloc_root (mem_root=0x72b000052d98, length=576) at /mariadb/10.6/mysys/my_alloc.c:189
|
#5 0x000055c7771bbcb1 in Item::operator new (size=552, mem_root=0x215000080b58) at /mariadb/10.6/sql/item.h:861
|
#6 eliminate_item_equal (thd=thd@entry=0x72b00004d018, cond=cond@entry=0x0, upper_levels=0x0, item_equal=<optimized out>) at /mariadb/10.6/sql/sql_select.cc:16889
|
#7 0x000055c777145c0f in substitute_for_best_equal_field (thd=0x72b00004d018, context_tab=context_tab@entry=0x1, cond=0x711000075470, cond_equal=0x711000075548, table_join_idx=0x71e0000213f8,
|
do_substitution=true) at /mariadb/10.6/sql/sql_select.cc:17069
|
#8 0x000055c777120aa1 in JOIN::optimize_stage2 (this=0x71a000030030) at /mariadb/10.6/sql/sql_select.cc:2710
|
The memory is being used here:
10.6 53c6c823dc7cafefffdc93c79661cfb146ff8641
|
#0 0x000055c776594018 in __msan_warning_with_origin_noreturn ()
|
#1 0x000055c77688bae2 in Item_func::not_null_tables (this=<optimized out>) at /mariadb/10.6/sql/item_func.cc:624
|
#2 0x000055c7767b42d7 in Item_cond::eval_not_null_tables (this=<optimized out>, opt_arg=<optimized out>) at /mariadb/10.6/sql/item_cmpfunc.cc:5187
|
#3 0x000055c7767b3708 in Item_cond::fix_fields (this=0x711000075970, thd=0x72b00004d018, ref=<optimized out>) at /mariadb/10.6/sql/item_cmpfunc.cc:5078
|
#4 0x000055c777218e1c in make_cond_for_table_from_pred (thd=0x72b00004d018, root_cond=0x711000075470, cond=0x711000075470, tables=13835058055282163713, used_table=used_table@entry=1,
|
join_tab_idx_arg=join_tab_idx_arg@entry=0, exclude_expensive_cond=false, retain_ref_cond=<optimized out>, is_top_and_level=<optimized out>) at /mariadb/10.6/sql/sql_select.cc:23938
|
#5 0x000055c77714a544 in make_cond_for_table (thd=<optimized out>, cond=<optimized out>, tables=<optimized out>, used_table=<optimized out>, join_tab_idx_arg=<optimized out>, exclude_expensive_cond=false,
|
retain_ref_cond=false) at /mariadb/10.6/sql/sql_select.cc:23866
|
#6 make_join_select (join=<optimized out>, join@entry=0x71a000030030, select=<optimized out>, cond=<optimized out>) at /mariadb/10.6/sql/sql_select.cc:12543
|
#7 0x000055c7771223f1 in JOIN::optimize_stage2 (this=0x71a000030030) at /mariadb/10.6/sql/sql_select.cc:2855
|
The construction of the object happens here:
eliminate_item_equal()
|
eq_item= new (thd->mem_root) Item_func_eq(thd,
|
field_item->remove_item_direct_ref(),
|
head_item->remove_item_direct_ref());
|
The following patch, which makes use of the C++11 data member default initializer feature (to have the initialization added to every constructor), fixes the bug:
diff --git a/sql/item_func.h b/sql/item_func.h
|
index 170fc943681..f3d3684f5b1 100644
|
--- a/sql/item_func.h
|
+++ b/sql/item_func.h
|
@@ -89,7 +89,7 @@ class Item_func :public Item_func_or_sum
|
static void wrong_param_count_error(const LEX_CSTRING &schema_name,
|
const LEX_CSTRING &func_name);
|
|
- table_map not_null_tables_cache;
|
+ table_map not_null_tables_cache= 0;
|
|
enum Functype { UNKNOWN_FUNC,EQ_FUNC,EQUAL_FUNC,NE_FUNC,LT_FUNC,LE_FUNC,
|
GE_FUNC,GT_FUNC,FT_FUNC,
|
I think that along with that addition, some redundant initialization should be removed.
{"report":{"fcp":1295.4000000953674,"ttfb":482.90000009536743,"pageVisibility":"visible","entityId":127953,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"8d46f31e-74d4-4d0e-b0b1-28bcc51ca967","navigationType":0,"readyForUser":1404.2000002861023,"redirectCount":0,"resourceLoadedEnd":1882,"resourceLoadedStart":496.6000003814697,"resourceTiming":[{"duration":184,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":496.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":496.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":680.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":183.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":497,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":497,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":680.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":191.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":497.2000002861023,"connectEnd":497.2000002861023,"connectStart":497.2000002861023,"domainLookupEnd":497.2000002861023,"domainLookupStart":497.2000002861023,"fetchStart":497.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":497.2000002861023,"responseEnd":688.7000002861023,"responseStart":688.7000002861023,"secureConnectionStart":497.2000002861023},{"duration":296.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":497.40000009536743,"connectEnd":497.40000009536743,"connectStart":497.40000009536743,"domainLookupEnd":497.40000009536743,"domainLookupStart":497.40000009536743,"fetchStart":497.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":497.40000009536743,"responseEnd":793.5,"responseStart":793.5,"secureConnectionStart":497.40000009536743},{"duration":300.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":497.7000002861023,"connectEnd":497.7000002861023,"connectStart":497.7000002861023,"domainLookupEnd":497.7000002861023,"domainLookupStart":497.7000002861023,"fetchStart":497.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":497.7000002861023,"responseEnd":798,"responseStart":798,"secureConnectionStart":497.7000002861023},{"duration":300.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":497.80000019073486,"connectEnd":497.80000019073486,"connectStart":497.80000019073486,"domainLookupEnd":497.80000019073486,"domainLookupStart":497.80000019073486,"fetchStart":497.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":497.80000019073486,"responseEnd":798.5,"responseStart":798.5,"secureConnectionStart":497.80000019073486},{"duration":301.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":498,"connectEnd":498,"connectStart":498,"domainLookupEnd":498,"domainLookupStart":498,"fetchStart":498,"redirectEnd":0,"redirectStart":0,"requestStart":498,"responseEnd":799.4000000953674,"responseStart":799.4000000953674,"secureConnectionStart":498},{"duration":392.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":498.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":498.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":891.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":302.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":498.30000019073486,"connectEnd":498.30000019073486,"connectStart":498.30000019073486,"domainLookupEnd":498.30000019073486,"domainLookupStart":498.30000019073486,"fetchStart":498.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":498.30000019073486,"responseEnd":800.4000000953674,"responseStart":800.4000000953674,"secureConnectionStart":498.30000019073486},{"duration":392.7000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":498.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":498.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":891.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":303.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":498.6000003814697,"connectEnd":498.6000003814697,"connectStart":498.6000003814697,"domainLookupEnd":498.6000003814697,"domainLookupStart":498.6000003814697,"fetchStart":498.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":498.6000003814697,"responseEnd":801.7000002861023,"responseStart":801.7000002861023,"secureConnectionStart":498.6000003814697},{"duration":783.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":499.6000003814697,"connectEnd":499.6000003814697,"connectStart":499.6000003814697,"domainLookupEnd":499.6000003814697,"domainLookupStart":499.6000003814697,"fetchStart":499.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":499.6000003814697,"responseEnd":1282.8000001907349,"responseStart":1282.7000002861023,"secureConnectionStart":499.6000003814697},{"duration":1382.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":499.6000003814697,"connectEnd":499.6000003814697,"connectStart":499.6000003814697,"domainLookupEnd":499.6000003814697,"domainLookupStart":499.6000003814697,"fetchStart":499.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":499.6000003814697,"responseEnd":1882,"responseStart":1882,"secureConnectionStart":499.6000003814697},{"duration":372.2000002861023,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":937.9000000953674,"connectEnd":937.9000000953674,"connectStart":937.9000000953674,"domainLookupEnd":937.9000000953674,"domainLookupStart":937.9000000953674,"fetchStart":937.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":937.9000000953674,"responseEnd":1310.1000003814697,"responseStart":1310.1000003814697,"secureConnectionStart":937.9000000953674},{"duration":641.7000002861023,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1287,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1287,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1928.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":608.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1458.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1458.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2067,"responseStart":0,"secureConnectionStart":0},{"duration":586.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1461.3000001907349,"connectEnd":1461.3000001907349,"connectStart":1461.3000001907349,"domainLookupEnd":1461.3000001907349,"domainLookupStart":1461.3000001907349,"fetchStart":1461.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1461.3000001907349,"responseEnd":2048.1000003814697,"responseStart":2048.1000003814697,"secureConnectionStart":1461.3000001907349},{"duration":588.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1462.1000003814697,"connectEnd":1462.1000003814697,"connectStart":1462.1000003814697,"domainLookupEnd":1462.1000003814697,"domainLookupStart":1462.1000003814697,"fetchStart":1462.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1462.1000003814697,"responseEnd":2050.5,"responseStart":2050.5,"secureConnectionStart":1462.1000003814697}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":279,"responseStart":483,"responseEnd":489,"domLoading":492,"domInteractive":1933,"domContentLoadedEventStart":1933,"domContentLoadedEventEnd":2013,"domComplete":2349,"loadEventStart":2350,"loadEventEnd":2350,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1884.2000002861023},{"name":"bigPipe.sidebar-id.end","time":1885.2000002861023},{"name":"bigPipe.activity-panel-pipe-id.start","time":1885.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1890.5},{"name":"activityTabFullyLoaded","time":2097.9000000953674}],"measures":[],"correlationId":"a27858ce404833","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":131,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The test test_bind_result_ext1 in main.mysql_client_test fails because only the least significant 32 bits of long bData are being initialized:
10.5 fb774eb1ebab7d397c10a516be364d395440d079
0x000055dbbce480f2 in convert_froma_string (r_param=r_param@entry=0x71c0000002b8, buffer=0x72400000201f "206\0036.7", len=<optimized out>) at /mariadb/10.5/libmariadb/libmariadb/ma_stmt_codec.c:536
536 longstore(r_param->buffer, (int32)val);
(rr) bt
#0 0x000055dbbce480f2 in convert_froma_string (r_param=r_param@entry=0x71c0000002b8, buffer=0x72400000201f "206\0036.7", len=<optimized out>) at /mariadb/10.5/libmariadb/libmariadb/ma_stmt_codec.c:536
#1 0x000055dbbce45c2c in ps_fetch_string (r_param=0x71c0000002b8, field=<optimized out>, row=0x7fff9b9cede0) at /mariadb/10.5/libmariadb/libmariadb/ma_stmt_codec.c:1197
#2 0x000055dbbce2a01c in mthd_stmt_fetch_to_bind (stmt=<optimized out>, row=<optimized out>) at /mariadb/10.5/libmariadb/libmariadb/mariadb_stmt.c:446
#3 0x000055dbbce327b6 in mysql_stmt_fetch (stmt=stmt@entry=0x718000000000) at /mariadb/10.5/libmariadb/libmariadb/mariadb_stmt.c:1503
#4 0x000055dbbcb881d9 in wrap_mysql_stmt_fetch (stmt=0x718000000000) at /mariadb/10.5/tests/nonblock-wrappers.h:351
#5 test_bind_result_ext1 () at /mariadb/10.5/tests/mysql_client_test.c:3927
#6 0x000055dbbcb52204 in main (argc=0, argv=0x70e000000078) at /mariadb/10.5/tests/mysql_client_fw.c:1459
This would appear to be a bug in Connector/C. long is 32 bits only on 32-bit platforms or LLP64 platforms, such as Microsoft Windows.