Skip to content

Fix some valgrind issues

Tomasz requested to merge github/fork/tszumski/valgrind-test-fix into master

Description

Fix most of the valgrind errors from issue #1543 (closed) After this PR is applied, only 3 errors left:

Syscall param write(buf) points to uninitialised byte(s)
   at 0xEC4EA1D: ??? (in /usr/lib64/libc-2.17.so)
   by 0xEBD9262: _IO_file_write@@GLIBC_2.2.5 (in /usr/lib64/libc-2.17.so)
   by 0xEBDAA7D: _IO_do_write@@GLIBC_2.2.5 (in /usr/lib64/libc-2.17.so)
   by 0xEBDCB24: _IO_flush_all_lockp (in /usr/lib64/libc-2.17.so)
   by 0xEBDCC84: _IO_cleanup (in /usr/lib64/libc-2.17.so)
   by 0xEB98C9A: __run_exit_handlers (in /usr/lib64/libc-2.17.so)
   by 0xEB98D36: exit (in /usr/lib64/libc-2.17.so)
   by 0xEB8155B: (below main) (in /usr/lib64/libc-2.17.so)
 Address 0x40241d0 is in a rw- anonymous segment

Conditional jump or move depends on uninitialised value(s)
   at 0x535376C: coding_loop_context_generation (EbRateDistortionCost.c:2264)
   by 0x5319829: product_coding_loop_init_fast_loop (EbProductCodingLoop.c:925)
   by 0x53AD2C0: first_pass_md_encode_block (firstpass.c:1336)
   by 0x5336394: mode_decision_sb (EbProductCodingLoop.c:8735)
   by 0x52568D1: mode_decision_kernel (EbEncDecProcess.c:4221)
   by 0xE648EA4: start_thread (in /usr/lib64/libpthread-2.17.so)
   by 0xEC5D8DC: clone (in /usr/lib64/libc-2.17.so)

Conditional jump or move depends on uninitialised value(s)
   at 0x5353708: coding_loop_context_generation (EbRateDistortionCost.c:2259)
   by 0x5319829: product_coding_loop_init_fast_loop (EbProductCodingLoop.c:925)
   by 0x53AD2C0: first_pass_md_encode_block (firstpass.c:1336)
   by 0x5336394: mode_decision_sb (EbProductCodingLoop.c:8735)
   by 0x52568D1: mode_decision_kernel (EbEncDecProcess.c:4221)
   by 0xE648EA4: start_thread (in /usr/lib64/libpthread-2.17.so)
   by 0xEC5D8DC: clone (in /usr/lib64/libc-2.17.so)

Issue

Author(s)

@tszumski

Performance impact

  • quality
  • memory
  • speed
  • 8 bit
  • 10 bit
  • N/A

Test set

  • obj-1-fast can be found here
  • other
  • N/A

Merge method

  • Allow the maintainer to squash and merge when PR is ready to create a 1-commit to the master branch. The maintainer will be able to fix typos / combine commit messages to create a more readable 1-commit message or use whatever is stated in the 'Description' section
  • I will clean up my commits and the maintainer shall use 'rebase and merge' to the master branch

Merge request reports