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

runtime error: call to function (udf_example) netaphon through pointer to incorrect function type 'char *(*)(st_udf_init *, st_udf_args *, char *, unsigned long *, unsigned char *, unsigned char *)

Details

    Description

      Like MDEV-35735 all the is_error and is_null error args are char* rather than unsigned char*.

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            and connector engine udf's too.

            danblack Daniel Black added a comment - and connector engine udf's too.
            danblack Daniel Black added a comment -

            bnestere, hope you don't mind doing a review on this, its just an extension to previous ptr function changes you've previously done.

            https://github.com/MariaDB/server/pull/3906

            danblack Daniel Black added a comment - bnestere , hope you don't mind doing a review on this, its just an extension to previous ptr function changes you've previously done. https://github.com/MariaDB/server/pull/3906
            danblack Daniel Black added a comment -

            Appended fix for:

            plugins.auth_ed25519                     w8 [ fail ]  Found warnings/errors in server log file!
                    Test ended at 2025-03-21 04:36:08
            line
            /source/sql/item_func.cc:3764:13: runtime error: call to function ed25519_password through pointer to incorrect function type 'char *(*)(st_udf_init *, st_udf_args *, char *, unsigned long *, unsigned char *, unsigned char *)'
            SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /source/sql/item_func.cc:3764:13 
            ^ Found warnings in /build/mysql-test/var/8/log/mysqld.1.err
            

            CURRENT_TEST: plugins.auth_ed25519
            /source/sql/item_func.cc:3764:13: runtime error: call to function ed25519_password through pointer to incorrect function type 'char *(*)(st_udf_init *, st_udf_
            args *, char *, unsigned long *, unsigned char *, unsigned char *)'
            /source/plugin/auth_ed25519/server_ed25519.c:139: note: ed25519_password defined here
                #0 0x564b3b5b7ae6 in udf_handler::val_str(String*, String*) /source/sql/item_func.cc:3764:13
                #1 0x564b3b5b9524 in Item_func_udf_str::val_str(String*) /source/sql/item_func.cc:3912:19
                #2 0x564b3af9f49c in Type_handler::Item_send_str(Item*, Protocol*, st_value*) const /source/sql/sql_type.cc:7597:19
                #3 0x564b3a40cf12 in Protocol::send_result_set_row(List<Item>*) /source/sql/protocol.cc:1329:15
                #4 0x564b3a637bf7 in select_send::send_data(List<Item>&) /source/sql/sql_class.cc:3219:17
                #5 0x564b3a93b14d in JOIN::exec_inner() /source/sql/sql_select.cc:4805:22
                #6 0x564b3a9392eb in JOIN::exec() /source/sql/sql_select.cc:4717:3
                #7 0x564b3a8c3f34 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_r
            esult*, st_select_lex_unit*, st_select_lex*) /source/sql/sql_select.cc:5196:9
                #8 0x564b3a8c3183 in handle_select(THD*, LEX*, select_result*, unsigned long) /source/sql/sql_select.cc:573:10
                #9 0x564b3a80f98c in execute_sqlcom_select(THD*, TABLE_LIST*) /source/sql/sql_parse.cc:6422:12
                #10 0x564b3a7f00c1 in mysql_execute_command(THD*, bool) /source/sql/sql_parse.cc:4013:12
                #11 0x564b3a7d5ab6 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /source/sql/sql_parse.cc:8209:18
                #12 0x564b3a7cdd5b in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /source/sql/sql_parse.cc:1908:7
                #13 0x564b3a7d7a1b in do_command(THD*, bool) /source/sql/sql_parse.cc:1421:17
                #14 0x564b3ad5794c in do_handle_one_connection(CONNECT*, bool) /source/sql/sql_connect.cc:1386:11
                #15 0x564b3ad572d2 in handle_one_connection /source/sql/sql_connect.cc:1298:5
                #16 0x564b3a38b476 in asan_thread_start(void*) asan_interceptors.cpp.o
                #17 0x7fdfaf9e61c3  (/lib/x86_64-linux-gnu/libc.so.6+0x891c3) (BuildId: c047672cae7964324658491e7dee26748ae5d2f8)
                #18 0x7fdfafa6685b  (/lib/x86_64-linux-gnu/libc.so.6+0x10985b) (BuildId: c047672cae7964324658491e7dee26748ae5d2f8)
            

            danblack Daniel Black added a comment - Appended fix for: plugins.auth_ed25519 w8 [ fail ] Found warnings/errors in server log file! Test ended at 2025-03-21 04:36:08 line /source/sql/item_func.cc:3764:13: runtime error: call to function ed25519_password through pointer to incorrect function type 'char *(*)(st_udf_init *, st_udf_args *, char *, unsigned long *, unsigned char *, unsigned char *)' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /source/sql/item_func.cc:3764:13 ^ Found warnings in /build/mysql-test/var/8/log/mysqld.1.err CURRENT_TEST: plugins.auth_ed25519 /source/sql/item_func.cc:3764:13: runtime error: call to function ed25519_password through pointer to incorrect function type 'char *(*)(st_udf_init *, st_udf_ args *, char *, unsigned long *, unsigned char *, unsigned char *)' /source/plugin/auth_ed25519/server_ed25519.c:139: note: ed25519_password defined here #0 0x564b3b5b7ae6 in udf_handler::val_str(String*, String*) /source/sql/item_func.cc:3764:13 #1 0x564b3b5b9524 in Item_func_udf_str::val_str(String*) /source/sql/item_func.cc:3912:19 #2 0x564b3af9f49c in Type_handler::Item_send_str(Item*, Protocol*, st_value*) const /source/sql/sql_type.cc:7597:19 #3 0x564b3a40cf12 in Protocol::send_result_set_row(List<Item>*) /source/sql/protocol.cc:1329:15 #4 0x564b3a637bf7 in select_send::send_data(List<Item>&) /source/sql/sql_class.cc:3219:17 #5 0x564b3a93b14d in JOIN::exec_inner() /source/sql/sql_select.cc:4805:22 #6 0x564b3a9392eb in JOIN::exec() /source/sql/sql_select.cc:4717:3 #7 0x564b3a8c3f34 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_r esult*, st_select_lex_unit*, st_select_lex*) /source/sql/sql_select.cc:5196:9 #8 0x564b3a8c3183 in handle_select(THD*, LEX*, select_result*, unsigned long) /source/sql/sql_select.cc:573:10 #9 0x564b3a80f98c in execute_sqlcom_select(THD*, TABLE_LIST*) /source/sql/sql_parse.cc:6422:12 #10 0x564b3a7f00c1 in mysql_execute_command(THD*, bool) /source/sql/sql_parse.cc:4013:12 #11 0x564b3a7d5ab6 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /source/sql/sql_parse.cc:8209:18 #12 0x564b3a7cdd5b in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /source/sql/sql_parse.cc:1908:7 #13 0x564b3a7d7a1b in do_command(THD*, bool) /source/sql/sql_parse.cc:1421:17 #14 0x564b3ad5794c in do_handle_one_connection(CONNECT*, bool) /source/sql/sql_connect.cc:1386:11 #15 0x564b3ad572d2 in handle_one_connection /source/sql/sql_connect.cc:1298:5 #16 0x564b3a38b476 in asan_thread_start(void*) asan_interceptors.cpp.o #17 0x7fdfaf9e61c3 (/lib/x86_64-linux-gnu/libc.so.6+0x891c3) (BuildId: c047672cae7964324658491e7dee26748ae5d2f8) #18 0x7fdfafa6685b (/lib/x86_64-linux-gnu/libc.so.6+0x10985b) (BuildId: c047672cae7964324658491e7dee26748ae5d2f8)

            People

              bnestere Brandon Nesterenko
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.