1. 08 Jul, 2020 2 commits
  2. 07 Jul, 2020 1 commit
  3. 06 Jul, 2020 2 commits
  4. 05 Jul, 2020 2 commits
    • Marko Mäkelä's avatar
      Fix cmake -DWITH_MSAN=ON · 79c166c5
      Marko Mäkelä authored
      commit ab406990 accidentally
      misplaced #endif directives.
      79c166c5
    • Marko Mäkelä's avatar
      After-merge fix for ASAN and MSAN · ab406990
      Marko Mäkelä authored
      The merge commit 0fd89a1a
      of commit b6ec1e8b
      seems to cause occasional MemorySanitizer failures,
      because it failed to replace some MEM_UNDEFINED() calls
      with MEM_MAKE_ADDRESSABLE().
      
      my_large_free(): Correctly invoke MEM_MAKE_ADDRESSABLE() after
      freeing memory. Failure to do so could cause bogus
      AddressSanitizer failures for memory allocated by my_large_malloc().
      On MemorySanitizer, we will do nothing.
      
      buf_pool_t::chunk_t::create(): Replace the MEM_MAKE_ADDRESSABLE()
      that had been added in commit 48493132
      to work around the issue.
      ab406990
  5. 04 Jul, 2020 5 commits
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 90d5d906
      Marko Mäkelä authored
      90d5d906
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · b99fa1e7
      Marko Mäkelä authored
      b99fa1e7
    • Marko Mäkelä's avatar
      Fixup the parent commit for MSAN and Valgrind · 453dc4b3
      Marko Mäkelä authored
      commit 48493132 was a necessary
      fix for the buffer pool resizing tests in 10.5 in
      AddressSanitizer. However, that change would break the tests
      innodb.innodb_buffer_pool_resize and
      innodb.innodb_buffer_pool_resize_with_chunks
      when run in MemorySanitizer, or presumably in Valgrind as well.
      (Those tests run "forever" in Valgrind.)
      
      buf_pool_resize(): Cancel the effect of MEM_NOACCESS() in Valgrind
      and ASAN. In MSAN, MEM_NOACCESS() is a no-op, and hence we must do
      nothing special here.
      
      MEM_MAKE_ADDRESSABLE() would declare the memory contents undefined.
      In this particular case, we must actually declare the contents
      defined for Valgrind.
      453dc4b3
    • Marko Mäkelä's avatar
      MDEV-22535 fixup: Define a single-caller function inline · a85f81af
      Marko Mäkelä authored
      Let us avoid any overhead in release builds, for an empty function.
      a85f81af
    • Marko Mäkelä's avatar
      After-merge fixes for ASAN · 2d00e003
      Marko Mäkelä authored
      The merge commit 0fd89a1a
      of commit b6ec1e8b
      was slightly incomplete.
      
      ReadView::mem_valid(): Use the correct primitive
      MEM_MAKE_ADDRESSABLE(), because MEM_UNDEFINED() now has
      no effect on ASAN.
      
      recv_sys_t::alloc(), recv_sys_t::add(): Use MEM_MAKE_ADDRESSABLE()
      instead of MEM_UNDEFINED(), to get the correct behaviour for ASAN.
      For Valgrind and MSAN, there is no change in behaviour.
      
      recv_sys_t::free(), recv_sys_t::clear(): Before freeing memory to
      buf_pool.free_list, invoke MEM_MAKE_ADDRESSABLE() on the entire
      buf_block_t::frame, to cancel the effect of MEM_NOACCESS() in
      recv_sys_t::alloc().
      2d00e003
  6. 03 Jul, 2020 20 commits
  7. 02 Jul, 2020 8 commits
    • Monty's avatar
      e6595a06
    • Monty's avatar
      6e81ba0c
    • Monty's avatar
      5211af1c
    • Monty's avatar
      Fixed errors found by MSAN · 53ecc354
      Monty authored
      53ecc354
    • Marko Mäkelä's avatar
      MDEV-20377 post-fix: Introduce MEM_MAKE_ADDRESSABLE · b6ec1e8b
      Marko Mäkelä authored
      In AddressSanitizer, we only want memory poisoning to happen
      in connection with custom memory allocation or freeing.
      
      The primary use of MEM_UNDEFINED is for declaring memory uninitialized
      in Valgrind or MemorySanitizer. We do not want MEM_UNDEFINED to
      have the unwanted side effect that AddressSanitizer would no longer
      be able to complain about accessing unallocated memory.
      
      MEM_UNDEFINED(): Define as no-op for AddressSanitizer.
      
      MEM_MAKE_ADDRESSABLE(): Define as MEM_UNDEFINED() or
      ASAN_UNPOISON_MEMORY_REGION().
      
      MEM_CHECK_ADDRESSABLE(): Wrap also __asan_region_is_poisoned().
      b6ec1e8b
    • Monty's avatar
      Fixed bugs found by valgrind · 65f831d1
      Monty authored
      - Some of the bug fixes are backports from 10.5!
      - The fix in innobase/fil/fil0fil.cc is just a backport to get less
        error messages in mysqld.1.err when running with valgrind.
      - Renamed HAVE_valgrind_or_MSAN to HAVE_valgrind
      65f831d1
    • Monty's avatar
      MDEV-22535 TABLE::initialize_quick_structures() takes 0.5% in oltp_read_only · 6cee9b19
      Monty authored
      Fixed by:
      - Make all quick_* variable allocated according to real number keys instead
        of MAX_KEY
      - Store all the quick* items in separated allocated structure (OPT_RANGE)
      - Ensure we don't access any quick* variable without first checking
        opt_range_keys.is_set().  Thanks to this, we don't need any
        pre-initialization of quick* variables anymore.
      
      Some renames was done to use the new structure:
      table->quick_keys                -> table->opt_range_keys
      table->quick_rows[X]             -> table->opt_range[X].rows
      table->quick_key_parts[X]        -> table->opt_range[X].key_parts
      table->quick_costs[X]            -> table->opt_range[X].cost
      table->quick_index_only_costs[X] -> table->opt_range[X].index_only_cost
      table->quick_n_ranges[X]         -> table->opt_range[X].ranges
      table->quick_condition_rows      -> table->opt_range_condition_rows
      
      This patch should both decrease memory needed for TABLE objects
      (3528 -> 984 + keyinfo) and increase performance, thanks to less
      initializations per query, and more localized memory, thanks to the
      opt_range structure.
      6cee9b19
    • Monty's avatar
      Fixed typo in InnoDB when compiling with VALGRIND · 5cbb18cb
      Monty authored
      5cbb18cb