• Alexander Barkov's avatar
    MDEV-29473 UBSAN: Signed integer overflow: X * Y cannot be represented in type... · 6216a2df
    Alexander Barkov authored
    MDEV-29473 UBSAN: Signed integer overflow: X * Y cannot be represented in type 'int' in strings/dtoa.c
    
    Fixing a few problems relealed by UBSAN in type_float.test
    
    - multiplication overflow in dtoa.c
    
    - uninitialized Field::geom_type (and Field::srid as well)
    
    - Wrong call-back function types used in combination with SHOW_FUNC.
      Changes in the mysql_show_var_func data type definition were not
      properly addressed all around the code by the following commits:
        b4ff6456
        18feb62f
        0ee879ff
    
      Adding a helper SHOW_FUNC_ENTRY() function and replacing
      all mysql_show_var_func declarations using SHOW_FUNC
      to SHOW_FUNC_ENTRY, to catch mysql_show_var_func in the future
      at compilation time.
    6216a2df
dtoa.c 65.1 KB