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

SIGSEGV in check_word|extract_date_time|Item_func_str_to_date::get_date_common

    XMLWordPrintable

Details

    • Bug
    • Status: In Progress (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 12.3
    • 12.3
    • Time zones
    • None
    • Can result in hang or crash
    • Q2/2026 Server Maintenance

    Description

      SET SESSION lc_time_names=ar_dz;
      SELECT (ACOS (1) DIV STR_TO_DATE('Wednesday, June 2, 2014', '%W, %M %e, %Y'));
      

      Leads to:

      CS 12.3.2 620733d35db2108dc34ad74f35f6b4cb2722b594 (Optimized, Clang 18.1.3-11) Build 06/04/2026

      Core was generated by `/test/MD060426-mariadb-12.3.2-linux-x86_64-opt/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x00005d41ee064879 in find_type2 (typelib=0x5d41ef2890f8 <my_locale_typelib_day_names_ar_DZ>, x=0x700f00018078 "Wednesday, June 2, 2014", length=9, part_match=0x7031bc196a17 "", cs=0x5d421f69aa78)at /test/12.3_opt/sql/strfunc.cc:182
       
      [Current thread is 1 (LWP 2842996)]
      (gdb) bt
      #0  0x00005d41ee064879 in find_type2 (typelib=0x5d41ef2890f8 <my_locale_typelib_day_names_ar_DZ>, x=0x700f00018078 "Wednesday, June 2, 2014", length=9, part_match=0x7031bc196a17 "", cs=0x5d421f69aa78)at /test/12.3_opt/sql/strfunc.cc:182
      #1  check_word2 (cs=0x5d421f69aa78, lib=0x5d41ef2890f8 <my_locale_typelib_day_names_ar_DZ>, val=0x700f00018078 "Wednesday, June 2, 2014", end=0x700f0001808f "", end_of_word=end_of_word@entry=0x7031bc196ac8)at /test/12.3_opt/sql/strfunc.cc:300
      #2  0x00005d41ee302fe1 in extract_date_time (thd=thd@entry=0x700f00000c68, format=format@entry=0x7031bc196e30, val=0x700f00018078 "Wednesday, June 2, 2014", length=23, l_time=l_time@entry=0x7031bc196f20, cached_timestamp_type=cached_timestamp_type@entry=MYSQL_TIMESTAMP_DATE, sub_pattern_end=0x0, date_time_type=0x5d41ee9a804d "datetime", fuzzydate={m_mode = date_conv_mode_t::CONV_NONE}, locale=0x5d41ef289038 <my_locale_ar_DZ>, cs=0x5d421f69aa78)at /test/12.3_opt/sql/item_timefunc.cc:276
      #3  0x00005d41ee302636 in Item_func_str_to_date::get_date_common (this=0x700f000182f0, thd=0x700f00000c68, ltime=0x7031bc196f20, fuzzydate=<optimized out>, tstype=MYSQL_TIMESTAMP_DATE)at /test/12.3_opt/sql/item_timefunc.cc:4742
      #4  0x00005d41ee13578b in Temporal_with_date::make_from_item (this=0x7031bc196f20, thd=0x700f00000c68, item=0x700f000182f0, fuzzydate=<optimized out>) at /test/12.3_opt/sql/sql_type.cc:1046
      #5  0x00005d41ee30ea97 in Temporal_with_date::Temporal_with_date (this=0x7031bc196f20, thd=0x700f00000c68, item=0x700f000182f0, fuzzydate={m_mode = date_mode_t::CONV_NONE})at /test/12.3_opt/sql/sql_type.h:2231
      #6  Date::Date (this=0x7031bc196f20, thd=0x700f00000c68, item=0x700f000182f0, fuzzydate={m_mode = date_mode_t::CONV_NONE})at /test/12.3_opt/sql/sql_type.h:2307
      #7  Date::Date (thd=0x700f00000c68, item=0x700f000182f0, this=<optimized out>)at /test/12.3_opt/sql/sql_type.h:2317
      #8  Date::Date (this=0x7031bc196ef0, item=0x700f000182f0)at /test/12.3_opt/sql/sql_type.h:2320
      #9  Item_handled_func::Handler_date::val_decimal (this=<optimized out>, item=0x700f000182f0, to=0x7031bc197068)at /test/12.3_opt/sql/item_func.h:682
      #10 0x00005d41ee1332ec in VDec::set (this=0x7031bc197060, item=0x0)at /test/12.3_opt/sql/sql_type.cc:327
      #11 0x00005d41ee273917 in VDec2_lazy::VDec2_lazy (this=0x7031bc197018, a=<optimized out>, b=0x700f000182f0) at /test/12.3_opt/sql/sql_type.h:607
      #12 Item_func_int_div::val_int (this=0x700f00018400)at /test/12.3_opt/sql/item_func.cc:1629
      #13 0x00005d41ee14b079 in Type_handler::Item_send_longlong (this=<optimized out>, item=0x5d41ee96932a, protocol=0x5d41ef2890f8 <my_locale_typelib_day_names_ar_DZ>, buf=0x0)at /test/12.3_opt/sql/sql_type.cc:7641
      #14 Type_handler_longlong::Item_send (this=<optimized out>, item=0x5d41ee96932a, protocol=0x5d41ef2890f8 <my_locale_typelib_day_names_ar_DZ>, buf=0x0)at /test/12.3_opt/sql/sql_type.h:6007
      #15 0x00005d41edea5631 in Protocol::send_result_set_row (this=0x700f000012b0, row_items=<optimized out>) at /test/12.3_opt/sql/protocol.cc:1358
      #16 0x00005d41edf1e1ff in select_send::send_data (this=0x700f00018ec8, items=@0x700f00017cd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x700f000184b8, last = 0x700f000184b8, elements = 1}, <No data fields>})at /test/12.3_opt/sql/sql_class.cc:3411
      #17 0x00005d41edf1dfaf in select_result_sink::send_data_with_check (this=0x5d421f69aa78, items=@0x5d41ee96932a: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0xabd8a7d884d9a7d8, last = 0xd80086d98ad986d9, elements = 3632585127}, <No data fields>}, u=0x5d41ef2890f8 <my_locale_typelib_day_names_ar_DZ>, sent=0)at /test/12.3_opt/sql/sql_class.cc:3309
      #18 0x00005d41edfcdbe1 in JOIN::exec_inner (this=this@entry=0x700f00018ef0)at /test/12.3_opt/sql/sql_select.cc:4996
      #19 0x00005d41edfb356b in JOIN::exec (this=0x700f00018ef0)at /test/12.3_opt/sql/sql_select.cc:4913
      #20 mysql_select (thd=thd@entry=0x700f00000c68, tables=<optimized out>, fields=@0x700f00017cd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x700f000184b8, last = 0x700f000184b8, elements = 1}, <No data fields>}, conds=<optimized out>, og_num=<optimized out>, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x700f00018ec8, unit=0x700f000051b8, select_lex=0x700f00017a18)at /test/12.3_opt/sql/sql_select.cc:5439
      #21 0x00005d41edfb3160 in handle_select (thd=thd@entry=0x700f00000c68, lex=lex@entry=0x700f000050d8, result=result@entry=0x700f00018ec8, setup_tables_done_option=setup_tables_done_option@entry=0)at /test/12.3_opt/sql/sql_select.cc:636
      #22 0x00005d41edf7e489 in execute_sqlcom_select (thd=thd@entry=0x700f00000c68, all_tables=0x0) at /test/12.3_opt/sql/sql_parse.cc:6212
      #23 0x00005d41edf7ccd7 in mysql_execute_command (thd=thd@entry=0x700f00000c68, is_called_from_prepared_stmt=false) at /test/12.3_opt/sql/sql_parse.cc:3987
      #24 0x00005d41edf75061 in mysql_parse (thd=thd@entry=0x700f00000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7031bc198410)at /test/12.3_opt/sql/sql_parse.cc:7940
      #25 0x00005d41edf734db in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x700f00000c68, packet=packet@entry=0x700f00008cc9 "", packet_length=packet_length@entry=77, blocking=true)at /test/12.3_opt/sql/sql_parse.cc:1896
      #26 0x00005d41edf75471 in do_command (thd=thd@entry=0x700f00000c68, blocking=true) at /test/12.3_opt/sql/sql_parse.cc:1432
      #27 0x00005d41ee0a640d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5d421ff713a8, put_in_cache=true)at /test/12.3_opt/sql/sql_connect.cc:1503
      #28 0x00005d41ee0a61cf in handle_one_connection (arg=arg@entry=0x5d421ff713a8)at /test/12.3_opt/sql/sql_connect.cc:1415
      #29 0x00005d41ee467ab9 in pfs_spawn_thread (arg=0x5d421ff420c8)at /test/12.3_opt/storage/perfschema/pfs.cc:2198
      #30 0x00007031bdc9caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #31 0x00007031bdd29c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  060426  6ffb219883725fabda83d77d68df88e16b3760ad  No bug found                  
      CS  10.6   opt  060426  6ffb219883725fabda83d77d68df88e16b3760ad  No bug found                  
      CS  10.11  dbg  060426  fb9d6e444c370bcce5f00047ad335953f174897a  No bug found                  
      CS  10.11  opt  060426  fb9d6e444c370bcce5f00047ad335953f174897a  No bug found                  
      CS  11.4   dbg  060426  3b206b9cc6ac3e8a975c7e1c0b5fd72024544fe7  No bug found                  
      CS  11.4   opt  060426  3b206b9cc6ac3e8a975c7e1c0b5fd72024544fe7  No bug found                  
      CS  11.8   dbg  060426  e47db94aea7f0d6e0177e948486fc8860331f05f  No bug found                  
      CS  11.8   opt  060426  e47db94aea7f0d6e0177e948486fc8860331f05f  No bug found                  
      CS  12.3   dbg  060426  620733d35db2108dc34ad74f35f6b4cb2722b594  SIGSEGV|find_type2|check_word2|extract_date_time|Item_func_str_to_date::get_date_common
      CS  12.3   opt  060426  620733d35db2108dc34ad74f35f6b4cb2722b594  SIGSEGV|find_type2|check_word2|extract_date_time|Item_func_str_to_date::get_date_common
      CS  13.0   dbg  110326  ef4be39bfcbae1b0090a3098e511d14457d6139f  No bug found                  
      CS  13.0   opt  110326  ef4be39bfcbae1b0090a3098e511d14457d6139f  No bug found                  
      ES  10.6   dbg  040825  9b794f34b48fb7eee490b6da44edc0f33a947447  No bug found                  
      ES  10.6   opt  040825  9b794f34b48fb7eee490b6da44edc0f33a947447  No bug found                  
      ES  11.4   dbg  040825  a1c03ccd54b582e75506687ee19b273ca897f261  No bug found                  
      ES  11.4   opt  040825  a1c03ccd54b582e75506687ee19b273ca897f261  No bug found                  
      ES  11.8   dbg  151025  780565c207e9ce0ebf7d8e3d59f223801447b619  No bug found                  
      ES  11.8   opt  151025  780565c207e9ce0ebf7d8e3d59f223801447b619  No bug found                  
      

      opt: No SAN issue detected
      dbg: No SAN issue detected

      Attachments

        Activity

          People

            raghunandan.bhat Raghunandan Bhat
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.