[zmq] Call va_end() on va_start()ed args. #10056

pull kallewoof wants to merge 1 commits into bitcoin:master from kallewoof:fix-zmqpublishnotifier-va-end changing 1 files +3 −0
  1. kallewoof commented at 8:14 PM on March 22, 2017: member

    A function that invokes va_start, shall also invoke va_end before it returns. (http://www.cplusplus.com/reference/cstdarg/va_start/)

    If there is no corresponding call to va_start or va_copy, or if va_end is not called before a function that calls va_start or va_copy returns, the behavior is undefined. http://en.cppreference.com/w/cpp/utility/variadic/va_end

  2. [zmq] Call va_end() on va_start()ed args. 5ba61f0034
  3. fanquake added the label RPC/REST/ZMQ on Mar 22, 2017
  4. gmaxwell commented at 1:40 AM on March 23, 2017: contributor

    ugh. see this is why we need to test on sparc. :P

    (On sparc forgetting to va_end will instantly corrupt the stack.)

  5. laanwj commented at 5:45 AM on March 23, 2017: member

    utACK, haven't checked though whether this covers all cases.

  6. paveljanik commented at 7:31 AM on March 23, 2017: contributor
  7. jonasschnelli commented at 7:31 AM on March 23, 2017: contributor

    utACK 5ba61f0034597ffeedc8c44af5a6ec670b095d83. I've check all the usages of va_list (va_start, va_copy) and expect of the ones covered in this PR we are good.

  8. laanwj commented at 7:54 AM on March 23, 2017: member

    ugh. see this is why we need to test of sparc. :P

    That reminds me, ideally we'd use typesafe c++11 variadic templates instead of C varags legacy mess.

  9. laanwj merged this on Mar 27, 2017
  10. laanwj closed this on Mar 27, 2017

  11. laanwj referenced this in commit e6156a0aa3 on Mar 27, 2017
  12. kallewoof deleted the branch on Mar 13, 2018
  13. PastaPastaPasta referenced this in commit f80f65a1d0 on Mar 14, 2019
  14. PastaPastaPasta referenced this in commit e4c069270e on May 20, 2019
  15. PastaPastaPasta referenced this in commit 6bb55d5474 on May 21, 2019
  16. PastaPastaPasta referenced this in commit f23fba0ded on May 21, 2019
  17. DeckerSU referenced this in commit c01c3cf3e5 on Jan 22, 2020
  18. barrystyle referenced this in commit 4efbdbe9cc on Jan 22, 2020
  19. DeckerSU referenced this in commit b801f4a1b1 on Jan 23, 2020
  20. Fair-Exchange referenced this in commit 2fac97b7d2 on May 16, 2020
  21. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

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