1. 25 Nov, 2016 2 commits
    • Marko Mäkelä's avatar
      MDEV-11349 (2/2) Fix some bogus-looking Valgrind warnings · a68d1352
      Marko Mäkelä authored
      buf_block_init(): Initialize buf_page_t::flush_type.
      For some reason, Valgrind 3.12.0 would seem to flag some
      bits in adjacent bitfields as uninitialized, even though only
      the two bits of flush_type were left uninitialized. Initialize
      the field to get rid of many warnings.
      
      buf_page_init_low(): Initialize buf_page_t::old.
      For some reason, Valgrind 3.12.0 would seem to flag all 32
      bits uninitialized when buf_page_init_for_read() invokes
      buf_LRU_add_block(bpage, TRUE). This would trigger bogus warnings
      for buf_page_t::freed_page_clock being uninitialized.
      (The V-bits would later claim that only "old" is initialized
      in the 32-bit word.) Perhaps recent compilers
      (GCC 6.2.1 and clang 4.0.0) generate more optimized x86_64 code
      for bitfield operations, confusing Valgrind?
      
      mach_write_to_1(), mach_write_to_2(), mach_write_to_3():
      Rewrite the assertions that ensure that the most significant
      bits are zero. Apparently, clang 4.0.0 would optimize expressions
      of the form ((n | 0xFF) <= 0x100) to (n <= 0x100). The redundant
      0xFF was added in the first place in order to suppress a
      Valgrind warning. (Valgrind would warn about comparing uninitialized
      values even in the case when the uninitialized bits do not affect
      the result of the comparison.)
      a68d1352
    • Marko Mäkelä's avatar
      MDEV-11349 (1/2) Fix some clang 4.0 warnings · 8da33e3a
      Marko Mäkelä authored
      In InnoDB and XtraDB functions that declare pointer parameters as nonnull,
      remove nullness checks, because GCC would optimize them away anyway.
      
      Use #ifdef instead of #if when checking for a configuration flag.
      
      Clang says that left shifts of negative values are undefined.
      So, use ~0U instead of ~0 in a number of macros.
      
      Some functions that were defined as UNIV_INLINE were declared as
      UNIV_INTERN. Consistently use the same type of linkage.
      
      ibuf_merge_or_delete_for_page() could pass bitmap_page=NULL to
      buf_page_print(), conflicting with the __attribute__((nonnull)).
      8da33e3a
  2. 24 Nov, 2016 1 commit
  3. 22 Nov, 2016 2 commits
  4. 16 Nov, 2016 1 commit
  5. 15 Nov, 2016 1 commit
  6. 14 Nov, 2016 1 commit
  7. 09 Nov, 2016 1 commit
  8. 08 Nov, 2016 1 commit
  9. 07 Nov, 2016 1 commit
  10. 04 Nov, 2016 4 commits
  11. 03 Nov, 2016 3 commits
  12. 02 Nov, 2016 12 commits
  13. 01 Nov, 2016 1 commit
  14. 31 Oct, 2016 3 commits
  15. 30 Oct, 2016 1 commit
  16. 29 Oct, 2016 5 commits