rpc: Capture UniValue by ref for rpcdoccheck #25237

pull mzumsande wants to merge 1 commits into bitcoin:master from mzumsande:202205_rpcdoc_capture changing 1 files +1 −1
  1. mzumsande commented at 1:00 pm on May 29, 2022: member
    Capturing it by reference instead of value should save us from making a copy of a potentially large object. Saw this while having a look at #25229 although I couldn’t reproduce an actual leak, so this is not a fix for that issue.
  2. rpc: Capture potentially large UniValue by ref for rpcdoccheck 20ff4991e5
  3. MarcoFalke commented at 1:20 pm on May 29, 2022: member

    Introduced in fa8192f42e1d24444f1d0433c96dbce1adf76967

    review ACK 20ff4991e548630d7bb5e491fa4d69ec49369872

  4. MarcoFalke added the label RPC/REST/ZMQ on May 29, 2022
  5. MarcoFalke added the label Resource usage on May 29, 2022
  6. MarcoFalke added the label Needs backport (22.x) on May 29, 2022
  7. MarcoFalke added the label Needs backport (23.x) on May 29, 2022
  8. MarcoFalke added this to the milestone 23.1 on May 29, 2022
  9. theStack approved
  10. theStack commented at 2:51 pm on May 29, 2022: member
    Code-review ACK 20ff4991e548630d7bb5e491fa4d69ec49369872
  11. furszy commented at 6:50 pm on May 29, 2022: member
    Code ACK 20ff4991
  12. fanquake merged this on May 30, 2022
  13. fanquake closed this on May 30, 2022

  14. MarcoFalke commented at 8:42 am on May 30, 2022: member
    https://github.com/bitcoin-core/univalue-subtree/pull/27 might have helped to discover this bug?
  15. fanquake removed the label Needs backport (22.x) on May 30, 2022
  16. fanquake removed the label Needs backport (23.x) on May 30, 2022
  17. fanquake commented at 8:48 am on May 30, 2022: member
    Backports in #25241 and #25242.
  18. laanwj commented at 9:27 am on May 30, 2022: member
    Post-merge ACK. Very good catch, I imagine this could result in quite a lot of allocation, copy and reallocation overhead for complex objects.
  19. sidhujag referenced this in commit 38c4651715 on May 30, 2022
  20. mzumsande deleted the branch on May 31, 2022
  21. DrahtBot locked this on May 31, 2023

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: 2024-11-21 12:12 UTC

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