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 11.7.1 d4d5bce2da0d22b25485da3904f9f5fc11d7fcd4 (Debug, UBASAN)
|
/test/11.7_dbg_san/sql/keycaches.cc:330:12: runtime error: call to function adjust_optimizer_costs(void*, OPTIMIZER_COSTS*, void*) through pointer to incorrect function type 'int (*)(const st_mysql_const_lex_string *, const OPTIMIZER_COSTS *, TABLE *)'
|
/test/11.7_dbg_san/sql/mysqld.cc:4928: note: adjust_optimizer_costs(void*, OPTIMIZER_COSTS*, void*) defined here
|
#0 0x55bdcb57b92c in process_optimizer_costs /test/11.7_dbg_san/sql/keycaches.cc:330:12
|
#1 0x55bdcb5090a1 in init_server_components() /test/11.7_dbg_san/sql/mysqld.cc:5310:5
|
#2 0x55bdcb4fcb1c in mysqld_main(int, char**) /test/11.7_dbg_san/sql/mysqld.cc:6019:7
|
#3 0x55bdcb4e74a3 in main /test/11.7_dbg_san/sql/main.cc:34:10
|
#4 0x150406a2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
|
#5 0x150406a2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
|
#6 0x55bdcb40bc74 in _start (/test/UBASAN_MD271124-mariadb-11.7.1-linux-x86_64-dbg/bin/mariadbd+0x420ac74) (BuildId: 4ffc5d87b420973421d7e440cab2c81981d3640e)
|
|
SUMMARY: UndefinedBehaviorSanitizer: function-type-mismatch /test/11.7_dbg_san/sql/keycaches.cc:330:12
|
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":773.7999999523163,"ttfb":169.89999997615814,"pageVisibility":"visible","entityId":131854,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"75f471ac-dd17-4ded-945a-e04a4a4facbc","navigationType":0,"readyForUser":835.3999999761581,"redirectCount":0,"resourceLoadedEnd":1052.7999999523163,"resourceLoadedStart":174.70000004768372,"resourceTiming":[{"duration":130.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":174.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":174.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":305.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":130.89999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":174.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":174.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":305.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":188,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":175.10000002384186,"connectEnd":175.10000002384186,"connectStart":175.10000002384186,"domainLookupEnd":175.10000002384186,"domainLookupStart":175.10000002384186,"fetchStart":175.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":175.10000002384186,"responseEnd":363.10000002384186,"responseStart":363.10000002384186,"secureConnectionStart":175.10000002384186},{"duration":230,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":175.20000004768372,"connectEnd":175.20000004768372,"connectStart":175.20000004768372,"domainLookupEnd":175.20000004768372,"domainLookupStart":175.20000004768372,"fetchStart":175.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":175.20000004768372,"responseEnd":405.2000000476837,"responseStart":405.2000000476837,"secureConnectionStart":175.20000004768372},{"duration":233.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":175.29999995231628,"connectEnd":175.29999995231628,"connectStart":175.29999995231628,"domainLookupEnd":175.29999995231628,"domainLookupStart":175.29999995231628,"fetchStart":175.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":175.29999995231628,"responseEnd":409,"responseStart":409,"secureConnectionStart":175.29999995231628},{"duration":234,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":175.39999997615814,"connectEnd":175.39999997615814,"connectStart":175.39999997615814,"domainLookupEnd":175.39999997615814,"domainLookupStart":175.39999997615814,"fetchStart":175.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":175.39999997615814,"responseEnd":409.39999997615814,"responseStart":409.39999997615814,"secureConnectionStart":175.39999997615814},{"duration":234.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":175.5,"connectEnd":175.5,"connectStart":175.5,"domainLookupEnd":175.5,"domainLookupStart":175.5,"fetchStart":175.5,"redirectEnd":0,"redirectStart":0,"requestStart":175.5,"responseEnd":410,"responseStart":410,"secureConnectionStart":175.5},{"duration":234.79999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":175.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":175.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":410.39999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":234.69999992847443,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":175.70000004768372,"connectEnd":175.70000004768372,"connectStart":175.70000004768372,"domainLookupEnd":175.70000004768372,"domainLookupStart":175.70000004768372,"fetchStart":175.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":175.70000004768372,"responseEnd":410.39999997615814,"responseStart":410.39999997615814,"secureConnectionStart":175.70000004768372},{"duration":235,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":175.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":175.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":410.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":234.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":176,"connectEnd":176,"connectStart":176,"domainLookupEnd":176,"domainLookupStart":176,"fetchStart":176,"redirectEnd":0,"redirectStart":0,"requestStart":176,"responseEnd":410.89999997615814,"responseStart":410.89999997615814,"secureConnectionStart":176},{"duration":870.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":181.29999995231628,"connectEnd":181.29999995231628,"connectStart":181.29999995231628,"domainLookupEnd":181.29999995231628,"domainLookupStart":181.29999995231628,"fetchStart":181.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":181.29999995231628,"responseEnd":1052,"responseStart":1052,"secureConnectionStart":181.29999995231628},{"duration":871.3999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":181.39999997615814,"connectEnd":181.39999997615814,"connectStart":181.39999997615814,"domainLookupEnd":181.39999997615814,"domainLookupStart":181.39999997615814,"fetchStart":181.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":181.39999997615814,"responseEnd":1052.7999999523163,"responseStart":1052.7999999523163,"secureConnectionStart":181.39999997615814},{"duration":461.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":579.3999999761581,"connectEnd":579.3999999761581,"connectStart":579.3999999761581,"domainLookupEnd":579.3999999761581,"domainLookupStart":579.3999999761581,"fetchStart":579.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":579.3999999761581,"responseEnd":1040.8999999761581,"responseStart":1040.8999999761581,"secureConnectionStart":579.3999999761581}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":169,"responseEnd":176,"domLoading":172,"domInteractive":1071,"domContentLoadedEventStart":1071,"domContentLoadedEventEnd":1106,"domComplete":1879,"loadEventStart":1879,"loadEventEnd":1880,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1055.2999999523163},{"name":"bigPipe.sidebar-id.end","time":1056.1000000238419},{"name":"bigPipe.activity-panel-pipe-id.start","time":1056.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1058.6000000238419},{"name":"activityTabFullyLoaded","time":1114.2000000476837}],"measures":[],"correlationId":"3f8cf78403aa49","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":100,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}