Make ParseScript and friends threadsafe #22869

issue JeremyRubin opened this issue on September 2, 2021
  1. JeremyRubin commented at 11:34 PM on September 2, 2021: contributor

    Currently Parsescript and others build a map as a static and it's not threadsafe -- these fields should be behind a mutex or initialized at compile time or something else.

  2. JeremyRubin added the label Bug on Sep 2, 2021
  3. JeremyRubin added the label good first issue on Sep 2, 2021
  4. MarcoFalke commented at 7:01 AM on September 3, 2021: member

    I don't understand this issue. I tried git grep --function-context 'ParseScript('|grep static and didn't find anything.

  5. kristapsk commented at 8:11 AM on September 3, 2021: contributor

    @MarcoFalke I found this one:

    https://github.com/bitcoin/bitcoin/blob/458a345b0590fd2fa04c7d8d70beb8d57e34bbc8/src/core_read.cpp#L27

    But as it's just a cache, why not just change it to thread_local?

  6. MarcoFalke commented at 8:19 AM on September 3, 2021: member

    That one seems to be addressed in #22875 already?

    So I think this can be closed.

    Also, in the future it would be good to use the good-first-issue template for good first issues.

  7. MarcoFalke removed the label good first issue on Sep 3, 2021
  8. JeremyRubin commented at 8:32 AM on September 3, 2021: contributor

    sorry for the confusion here

  9. JeremyRubin closed this on Sep 3, 2021

  10. DrahtBot locked this on Sep 3, 2022

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-15 21:14 UTC

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