-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement mt_pooled_secure_allocator and use it for BLS secure allocation #2375
Conversation
@@ -0,0 +1,86 @@ | |||
// Copyright (c) 2009-2010 Satoshi Nakamoto | |||
// Copyright (c) 2009-2015 The Bitcoin Core developers |
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.
a copy/paste error I guess :)
@@ -0,0 +1,72 @@ | |||
// Copyright (c) 2009-2010 Satoshi Nakamoto | |||
// Copyright (c) 2009-2015 The Bitcoin Core developers |
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.
same
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.
utACK
Hmmm
|
Fixed (didn't check for nullptr in deallocation, resulting in |
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.
utACK
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.
utACK
87aa3b5
Fixed another crash that happened on shutdown. This should fix the rpc failures. |
87aa3b5
to
513dee8
Compare
The old solution relied on thread-local-storage and was thus not compatible to libc6 2.11 (which is the minimum supported version we use). Also, the old solution turned out to be erroneous. It would have crashed or memory leaked when ownership of CBLSPrivateKey would be handled over to another thread.
513dee8
to
d6d1403
Compare
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.
utACK
(looks like tests are failing for other reasons)
…tion (dashpay#2375) * Add pooled_secure_allocator and mt_pooled_secure_allocator * Use mt_pooled_secure_allocator for BLS secure allocation The old solution relied on thread-local-storage and was thus not compatible to libc6 2.11 (which is the minimum supported version we use). Also, the old solution turned out to be erroneous. It would have crashed or memory leaked when ownership of CBLSPrivateKey would be handled over to another thread. * Add new header files to Makefile.am * Fix copyright headers of new files * Bail out early from secure deallocation * Clean up global BLS keys when shutting down
Description from second commit:
The old solution relied on thread-local-storage and was thus not compatible
to libc6 2.11 (which is the minimum supported version we use).
Also, the old solution turned out to be erroneous. It would have crashed
or memory leaked when ownership of CBLSPrivateKey would be handled over
to another thread.