tests: Make sure we’re not passing an uninitialized array to memcmp(…) #532

pull practicalswift wants to merge 1 commits into bitcoin-core:master from practicalswift:uninitialized changing 1 files +2 −2
  1. practicalswift commented at 7:40 am on May 6, 2018: contributor
    Make sure we’re not passing an uninitialized array to memcmp(...).
  2. tests: Make sure we're not passing an uninitialized array to memcmp(...) 1eae9b1c69
  3. gmaxwell commented at 4:38 am on February 21, 2019: contributor
    I think this change would reduce the sensitivity of valgrind. By initializing it ourselves we’ll suppress errors where the underlying code, which should have initialized it at least up to the length we’re using failed to do so.
  4. gmaxwell commented at 0:07 am on May 23, 2019: contributor
    I still don’t see a reason to do this and there hasn’t been recent activity. I believe I understand the motivation, I think the disadvantage of masking errors that valgring/mem-santizer would find makes it not worth it. The valgrind component of the concern could be avoided by using valgrind macros to mark the array uninitilized but I’m aware of no comparable change for the sanitizers.
  5. gmaxwell closed this on May 23, 2019

  6. real-or-random cross-referenced this on May 23, 2019 from issue memcmp() may read unitiliazed memory in tests by real-or-random
  7. practicalswift commented at 10:18 am on May 26, 2019: contributor
    Fix in #627.
  8. practicalswift cross-referenced this on May 26, 2019 from issue Guard memcmp in tests against mixed size inputs. by gmaxwell

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me