-
Notifications
You must be signed in to change notification settings - Fork 276
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
Use library to_hex
function
#573
Conversation
WTF ASAN issue here too now??? |
|
I hacked up a crate that uses |
There is something strange going on, if we change ( static int rustsecp256k1_v0_8_0_eckey_pubkey_parse(rustsecp256k1_v0_8_0_ge *elem, const unsigned char *pub, size_t size) {
printf("\n\nsize: %d\n\n", size);
if (size != 0) {
return 0;
} The memory sanitizer errors for the Function call stack: |
I'm using this invocation to call ASAN and isolate the call path above.
|
That's very weird. valgrind doesn't complain about anything, I'm trying to delete more and more stuff to get a minimal reproducible example |
Seems it is an LLVM bug: rust-lang/rust#107149 Adding |
This one is in tests so no big deal, but I think this library should depend on |
@Kixunil libsecp has its own sha256 implementation. The dependency on bitcoin-hashes here is purely to get the |
LOL, I meant to write "hex impl" |
5a3f13e Overcome ASAN false positive regression (Tobin C. Harding) Pull request description: The Memory Sanitizer is giving a false positive at the moment in `nightly`. Adding compiler flags resolves the issue. I didn't grok the exact root cause but this fixes it (cut'n'pasta from the issue [0]). Props to elichai for working this out: #573 (comment) [0] rust-lang/rust#107149 ACKs for top commit: apoelstra: ACK 5a3f13e Tree-SHA512: 873145b732f7574c93ecc1bbabd9d82a1e501a39d1e2184770f71a07ffb72468783ab1b3fbfef8ef377c7e7a4b8c45253da1fce11660152d3369902136f1c049
Oh, lol! That would make much more sense, given that there is no "hash impl" in bitcoin-internals. Having said this, I don't really like the idea of there being a non-optional dependency on a perma-unstable crate, even if it's one that we maintain. If we got more than just hex decoding from it maybe. |
We do not need to use the `hex` module from `bitcoin_hashes` to encode into hex, we have a function in this library. Use library hex encoding logic, removes dependency on the `hex` module of `bitcoin_hashes` entirely from this crate.
53bbaa9
to
bdfa0ff
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.
ACK bdfa0ff
I think some error stuff as well. |
We do not need to use the
hex
module frombitcoin_hashes
to encode into hex, we have a function in this library.Use library hex encoding logic, removes dependency on the
hex
module ofbitcoin_hashes
entirely from this crate.