mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 03:30:42 +02:00
Merge bitcoin/bitcoin#32437: crypto: disable ASan for sha256_sse4 with Clang
4e8ab5e00f
crypto: disable ASan for sha256_sse4 with Clang (fanquake) Pull request description: This also fails to compile when optimisations are being used, see: https://github.com/bitcoin/bitcoin/issues/31913. So just disable ASan under any optimisation level. Closes #31913. ACKs for top commit: maflcko: lgtm ACK4e8ab5e00f
davidgumberg: Tested ACK4e8ab5e00f
laanwj: Code review ACK4e8ab5e00f
Tree-SHA512: 680fb424f43b35730e03e0c7443c80445a2cf423d4f9161414ea22fea0b955f49197f8a96d1241896d981c6c13814d3eb7b5e4d8c9138813fb69e437ac4768ea
This commit is contained in:
commit
03ebdd0793
@ -13,13 +13,17 @@
|
|||||||
namespace sha256_sse4
|
namespace sha256_sse4
|
||||||
{
|
{
|
||||||
void Transform(uint32_t* s, const unsigned char* chunk, size_t blocks)
|
void Transform(uint32_t* s, const unsigned char* chunk, size_t blocks)
|
||||||
#if defined(__clang__) && !defined(__OPTIMIZE__)
|
#if defined(__clang__)
|
||||||
/*
|
/*
|
||||||
clang is unable to compile this with -O0 and -fsanitize=address.
|
clang is unable to compile this with -O0 and -fsanitize=address.
|
||||||
See upstream bug: https://github.com/llvm/llvm-project/issues/92182
|
See upstream bug: https://github.com/llvm/llvm-project/issues/92182.
|
||||||
|
This also fails to compile with -O2, -fcf-protection & -fsanitize=address.
|
||||||
|
See https://github.com/bitcoin/bitcoin/issues/31913.
|
||||||
*/
|
*/
|
||||||
|
#if __has_feature(address_sanitizer)
|
||||||
__attribute__((no_sanitize("address")))
|
__attribute__((no_sanitize("address")))
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
static const uint32_t K256 alignas(16) [] = {
|
static const uint32_t K256 alignas(16) [] = {
|
||||||
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
||||||
|
Loading…
Reference in New Issue
Block a user