-
Notifications
You must be signed in to change notification settings - Fork 38.7k
fix crash on shutdown when e.g. changing -txindex and abort action #6282
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
src/wallet/db.h
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.
Shouldn't this field go away, then?
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.
I didn't replace all occurances, because it's used when building paths still.
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.
Do add a comment then, on why the duplicated field was added. Otherwise people will be really confused to read this code.
|
If My suggestion would be to precompute all the usages of Then in the initialization Remove the |
|
@laanwj That suggestion is fine, I tried to be minimal invasive but will gladly remove the path field. |
|
@laanwj See pull after rebase, I removed the |
|
Seems the build faulire is unrelated to the pull: "No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself. The build has been terminated" |
|
Looks good to me, utACK, travis error is the misbehaving comparison tool again... |
|
Now it passed, great! |
Right. Eliminating the uses of boost::filesystem is not the goal here, just avoiding that a static |
src/wallet/db.h
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.
Please add a comment here why this field is a string instead of a boost::filesystem::path, so that a future smart-ass doesn't think "hey let's use that type directly" and changes it back.
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!
- fixes #3136 - the problem is related to Boost path and a static initialized internal pointer - using a std::string in CDBEnv::EnvShutdown() prevents the problem - this removes the boost::filesystem::path path field from CDBEnv
|
utACK |
0ce30ea fix crash on shutdown when e.g. changing -txindex and abort action (Philip Kaufmann)
pointer