-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Fix races for strMiscWarning and fLargeWork*Found, make QT runawayException use GetWarnings #9236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I have not yet tested the QT part of this change. |
|
General Concept ACK but I would prefer moving the warning function in a new file (seems to be a misuse of utils.h/c). |
|
Maybe `ui_interface.*` for `GetWarnings()`?
|
|
@MarcoFalke Can you walk me through your reason for adding a third warning context there? |
|
utACK 6ed742dcbeeb16e7e5fcc42b292bc0c43f5e219c |
src/warnings.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No RPC info about pre-release build? (I know you only copied this from prev. location.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strStatusBar does that, RPC is what you get in safemode errors, effectively.
|
My initial thinking was to put all such ui related code into |
src/main.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe std::string to preempt silent merge conflicts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
Needs rebase. |
1 similar comment
|
Needs rebase. |
|
I believe I addressed the comments from @MarcoFalke |
|
utACK 0b5a146cbc04949a8eb2a3f07e53c768fb0ca7dd |
…strMiscWarning. This is a first step in avoiding racy accesses to strMiscWarning. The change required moving GetWarnings and related globals to util.
This moves all access to these datastructures through accessor functions and protects them with a lock.
|
Rebased for the main murder mania. |
|
Makes sense. utACK 749be01 |
…, make QT runawayException use GetWarnings 749be01 Move GetWarnings() into its own file. (Gregory Maxwell) e3ba0ef Eliminate data races for strMiscWarning and fLargeWork*Found. (Gregory Maxwell) c63198f Make QT runawayException call GetWarnings instead of directly access strMiscWarning. (Gregory Maxwell)
…, make QT runawayException use GetWarnings 749be01 Move GetWarnings() into its own file. (Gregory Maxwell) e3ba0ef Eliminate data races for strMiscWarning and fLargeWork*Found. (Gregory Maxwell) c63198f Make QT runawayException call GetWarnings instead of directly access strMiscWarning. (Gregory Maxwell)
…, make QT runawayException use GetWarnings 749be01 Move GetWarnings() into its own file. (Gregory Maxwell) e3ba0ef Eliminate data races for strMiscWarning and fLargeWork*Found. (Gregory Maxwell) c63198f Make QT runawayException call GetWarnings instead of directly access strMiscWarning. (Gregory Maxwell)
Upstream PRs relating to strMiscWarning This pulls in upstream PRs bitcoin/bitcoin#7114 and bitcoin/bitcoin#9236 (non-QT parts). * Fixes bitcoin/bitcoin#6809 - run-of-the-mill exceptions should not get into `strMiscWarning` (which is reported by `getinfo`). * Eliminate data races for `strMiscWarning` and `fLargeWork*Found`. This moves all access to these data structures through accessor functions and protects them with a lock.
Upstream PRs relating to strMiscWarning This pulls in upstream PRs bitcoin/bitcoin#7114 and bitcoin/bitcoin#9236 (non-QT parts). * Fixes bitcoin/bitcoin#6809 - run-of-the-mill exceptions should not get into `strMiscWarning` (which is reported by `getinfo`). * Eliminate data races for `strMiscWarning` and `fLargeWork*Found`. This moves all access to these data structures through accessor functions and protects them with a lock.
…ound 97a85eb [GUI] Connect alert signal (furszy) ce58263 Move GetWarnings() into its own file. (furszy) 3fee808 util GetWarnings, adding "gui" parameter type. (furszy) e074feb Eliminate data races for strMiscWarning and fLargeWork*Found. This moves all access to these datastructures through accessor functions and protects them with a lock. (furszy) 5fdd73e Make QT runawayException call GetWarnings instead of directly access strMiscWarning. (furszy) c684718 Separate CTranslationInterface from CClientUIInterface (furszy) 0b62015 [Cleanup] Remove unused global fields from util.h/cpp (furszy) Pull request description: Back ported two different PRs from upstream to solve possible races over the `strMiscWarning` and `fLargeWork*Found` global fields plus some small cleanup. dashpay#6022: to not depend on `guiinterface.h` every time that a back end text needs translations. bitcoin#9236: eliminating data races for strMiscWarning and fLargeWork*Found and making QT `runawayException` call `GetWarnings("gui")` instead of directly access `strMiscWarning`. Extra information: This work is part of a larger rabbit hole that i'm working on to be able to solve #1973 current issues and compile the project in macOS again (solving the newer boost version errors). ACKs for top commit: Fuzzbawls: ACK 97a85eb random-zebra: utACK 97a85eb and merging... Tree-SHA512: 0a2549f19ecadff1c3e275649599e9cf043404a213f8418e85cc009d7f56c98c704de53f3700a88acd9cdaf1e5ff73bc3b1d9951d76469c7283d2e7cfaaf6628
Eliminate data races for strMiscWarning and fLargeWork*Found.
This moves all access to these datastructures through accessor functions and protects them with a lock.
and
Make QT runawayException call GetWarnings("gui") instead of directly access strMiscWarning.