export UBSAN_OPTIONS=print_stacktrace=1:report_error_type=1
|
rm -Rf data tmp
|
mkdir tmp
|
./scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal --basedir=${PWD} --tmpdir=${PWD}/tmp --datadir=${PWD}/data
|
Leads to:
CS 10.6.21 2255be03952e0be7db764613956c5c66a6c1ab75 (Debug, UBASAN)
|
/test/10.6_dbg_san/storage/innobase/log/log0sync.cc:388:5: runtime error: call to function thd_decrement_pending_ops through pointer to incorrect function type 'void (*)(void *)'
|
/test/10.6_dbg_san/sql/sql_class.cc:5242: note: thd_decrement_pending_ops defined here
|
#0 0x560de360ae53 in group_commit_lock::release(unsigned long) /test/10.6_dbg_san/storage/innobase/log/log0sync.cc:388:5
|
#1 0x560de3509dcc in log_write_up_to(unsigned long, bool, bool, completion_callback const*) /test/10.6_dbg_san/storage/innobase/log/log0log.cc:739:26
|
#2 0x560de3e55c80 in trx_flush_log_if_needed(unsigned long, trx_t*) /test/10.6_dbg_san/storage/innobase/trx/trx0trx.cc:1269:5
|
#3 0x560de3e4c0e5 in trx_t::commit_in_memory(mtr_t const*) /test/10.6_dbg_san/storage/innobase/trx/trx0trx.cc:1488:7
|
#4 0x560de3e4c0e5 in trx_t::commit_low(mtr_t*) /test/10.6_dbg_san/storage/innobase/trx/trx0trx.cc:1590:3
|
#5 0x560de3e4e452 in trx_t::commit_persist() /test/10.6_dbg_san/storage/innobase/trx/trx0trx.cc:1604:3
|
#6 0x560de3e4e9cc in trx_t::commit() /test/10.6_dbg_san/storage/innobase/trx/trx0trx.cc:1613:3
|
#7 0x560de4386394 in dict_stats_save(dict_table_t*, unsigned long const*) /test/10.6_dbg_san/storage/innobase/dict/dict0stats.cc:3110:7
|
#8 0x560de438a29c in dict_stats_update(dict_table_t*, dict_stats_upd_option_t) /test/10.6_dbg_san/storage/innobase/dict/dict0stats.cc:3779:12
|
#9 0x560de2feef3a in ha_innobase::create(char const*, TABLE*, HA_CREATE_INFO*, bool, trx_t*) /test/10.6_dbg_san/storage/innobase/handler/ha_innodb.cc:13322:9
|
#10 0x560de2ff00ac in ha_innobase::create(char const*, TABLE*, HA_CREATE_INFO*) /test/10.6_dbg_san/storage/innobase/handler/ha_innodb.cc:13344:10
|
#11 0x560de0f6016e in handler::ha_create(char const*, TABLE*, HA_CREATE_INFO*) /test/10.6_dbg_san/sql/handler.cc:5616:14
|
#12 0x560de0f73a0c in ha_create_table(THD*, char const*, char const*, char const*, HA_CREATE_INFO*, st_mysql_const_unsigned_lex_string*, bool) /test/10.6_dbg_san/sql/handler.cc:6082:22
|
#13 0x560ddf5deefb in create_table_impl(THD*, st_ddl_log_state*, st_ddl_log_state*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*) /test/10.6_dbg_san/sql/sql_table.cc:4517:11
|
#14 0x560ddf5d72b0 in mysql_create_table_no_lock(THD*, st_ddl_log_state*, st_ddl_log_state*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*) /test/10.6_dbg_san/sql/sql_table.cc:4617:8
|
#15 0x560ddf5e4cf8 in mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) /test/10.6_dbg_san/sql/sql_table.cc:4839:7
|
#16 0x560ddf6c9e72 in Sql_cmd_create_table_like::execute(THD*) /test/10.6_dbg_san/sql/sql_table.cc:12328:12
|
#17 0x560dded0933c in mysql_execute_command(THD*, bool) /test/10.6_dbg_san/sql/sql_parse.cc:6152:26
|
#18 0x560ddee4eef9 in Prepared_statement::execute(String*, bool) /test/10.6_dbg_san/sql/sql_prepare.cc:5265:14
|
#19 0x560ddee22796 in Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) /test/10.6_dbg_san/sql/sql_prepare.cc:4671:10
|
#20 0x560ddee1fa02 in mysql_sql_stmt_execute(THD*) /test/10.6_dbg_san/sql/sql_prepare.cc:3697:16
|
#21 0x560ddecb4ea7 in mysql_execute_command(THD*, bool) /test/10.6_dbg_san/sql/sql_parse.cc:4015:5
|
#22 0x560ddec5bed9 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:8194:18
|
#23 0x560ddec58a15 in bootstrap(st_mysql_file*) /test/10.6_dbg_san/sql/sql_parse.cc:1094:5
|
#24 0x560dde111328 in mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5888:26
|
#25 0x560dde0fb863 in main /test/10.6_dbg_san/sql/main.cc:34:10
|
#26 0x1482e002a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
|
#27 0x1482e002a28a in __libc_start_main csu/../csu/libc-start.c:360:3
|
#28 0x560dde020034 in _start (/test/UBASAN_MD271124-mariadb-10.6.21-linux-x86_64-dbg/bin/mariadbd+0x3eb8034) (BuildId: 3cd87cd3953ac9cf3a930328b34dbd55d44c8146)
|
|
SUMMARY: UndefinedBehaviorSanitizer: function-type-mismatch /test/10.6_dbg_san/storage/innobase/log/log0sync.cc:388:5
|
Observed using UBSAN with Clang and LLMV 18.1.3:
sudo apt install clang llvm-18 llvm-18-linker-tools llvm-18-runtime llvm-18-tools llvm-18-dev libstdc++-14-dev llvm-dev llvm-17-linker-tools # llvm-17-linker-tools installs /usr/lib/llvm-17/lib/LLVMgold.so, which is needed for compilation, and LLVMgold.so is no longer included in LLVM 18
|
sudo ln -s /usr/lib/llvm-17/lib/LLVMgold.so /usr/lib/llvm-18/lib/LLVMgold.so
|
...
|
export UBSAN_OPTIONS=print_stacktrace=1:report_error_type=1
|
Related helpful comment on 'function-type-mismatch' errors here.
- is part of
-
MDEV-34348
MariaDB is violating clang-16 -Wcast-function-type-strict
-
-
Closed
{"report":{"fcp":1210.3000001907349,"ttfb":304.19999980926514,"pageVisibility":"visible","entityId":131849,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"eace0432-9035-4c3e-b9ee-e25cbd69a948","navigationType":0,"readyForUser":1294.5999999046326,"redirectCount":0,"resourceLoadedEnd":910.0999999046326,"resourceLoadedStart":312.80000019073486,"resourceTiming":[{"duration":113.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":312.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":312.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":426.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":113.5,"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":313.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":313.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":426.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":396.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":313.30000019073486,"connectEnd":313.30000019073486,"connectStart":313.30000019073486,"domainLookupEnd":313.30000019073486,"domainLookupStart":313.30000019073486,"fetchStart":313.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":429.69999980926514,"responseEnd":709.9000000953674,"responseStart":459.30000019073486,"secureConnectionStart":313.30000019073486},{"duration":595.5999999046326,"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":314.5,"connectEnd":314.5,"connectStart":314.5,"domainLookupEnd":314.5,"domainLookupStart":314.5,"fetchStart":314.5,"redirectEnd":0,"redirectStart":0,"requestStart":428.90000009536743,"responseEnd":910.0999999046326,"responseStart":448.59999990463257,"secureConnectionStart":314.5},{"duration":148.40000009536743,"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":316,"connectEnd":316,"connectStart":316,"domainLookupEnd":316,"domainLookupStart":316,"fetchStart":316,"redirectEnd":0,"redirectStart":0,"requestStart":429.90000009536743,"responseEnd":464.40000009536743,"responseStart":461.19999980926514,"secureConnectionStart":316},{"duration":141.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":316.30000019073486,"connectEnd":316.30000019073486,"connectStart":316.30000019073486,"domainLookupEnd":316.30000019073486,"domainLookupStart":316.30000019073486,"fetchStart":316.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":432.80000019073486,"responseEnd":458,"responseStart":456.59999990463257,"secureConnectionStart":316.30000019073486},{"duration":144.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":316.40000009536743,"connectEnd":316.40000009536743,"connectStart":316.40000009536743,"domainLookupEnd":316.40000009536743,"domainLookupStart":316.40000009536743,"fetchStart":316.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":433.09999990463257,"responseEnd":460.80000019073486,"responseStart":458.19999980926514,"secureConnectionStart":316.40000009536743},{"duration":114.5,"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":316.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":316.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":431.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":148,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":316.69999980926514,"connectEnd":316.69999980926514,"connectStart":316.69999980926514,"domainLookupEnd":316.69999980926514,"domainLookupStart":316.69999980926514,"fetchStart":316.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":434.90000009536743,"responseEnd":464.69999980926514,"responseStart":461.80000019073486,"secureConnectionStart":316.69999980926514},{"duration":116.2999997138977,"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":316.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":316.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":433.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":149.5,"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":317.09999990463257,"connectEnd":317.09999990463257,"connectStart":317.09999990463257,"domainLookupEnd":317.09999990463257,"domainLookupStart":317.09999990463257,"fetchStart":317.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":436.90000009536743,"responseEnd":466.59999990463257,"responseStart":462.59999990463257,"secureConnectionStart":317.09999990463257},{"duration":573.2999997138977,"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":319.40000009536743,"connectEnd":319.40000009536743,"connectStart":319.40000009536743,"domainLookupEnd":319.40000009536743,"domainLookupStart":319.40000009536743,"fetchStart":319.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":509,"responseEnd":892.6999998092651,"responseStart":882.5999999046326,"secureConnectionStart":319.40000009536743},{"duration":574.0999999046326,"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":319.40000009536743,"connectEnd":319.40000009536743,"connectStart":319.40000009536743,"domainLookupEnd":319.40000009536743,"domainLookupStart":319.40000009536743,"fetchStart":319.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":530.8000001907349,"responseEnd":893.5,"responseStart":884,"secureConnectionStart":319.40000009536743},{"duration":149.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":854.4000000953674,"connectEnd":854.4000000953674,"connectStart":854.4000000953674,"domainLookupEnd":854.4000000953674,"domainLookupStart":854.4000000953674,"fetchStart":854.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":967.5999999046326,"responseEnd":1004,"responseStart":1003.3000001907349,"secureConnectionStart":854.4000000953674}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":110,"responseStart":304,"responseEnd":321,"domLoading":308,"domInteractive":1357,"domContentLoadedEventStart":1357,"domContentLoadedEventEnd":1406,"domComplete":1846,"loadEventStart":1846,"loadEventEnd":1847,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1335.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1336.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1336.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1337.9000000953674},{"name":"activityTabFullyLoaded","time":1421.6999998092651}],"measures":[],"correlationId":"3d4990b91a5a4b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":106,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Right, thank you, fixed