Skip to content

Commit 141df0a

Browse files
committed
crypto: disable asan for sha256_sse4 with clang and -O0
Clang is unable to compile the Transform function for that combination of options.
1 parent 42d5a1f commit 141df0a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/crypto/sha256_sse4.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
namespace sha256_sse4
1414
{
1515
void Transform(uint32_t* s, const unsigned char* chunk, size_t blocks)
16+
#if defined(__clang__) && !defined(__OPTIMIZE__)
17+
/*
18+
clang is unable to compile this with -O0 and -fsanitize=address.
19+
See upstream bug: https://github.com/llvm/llvm-project/issues/92182
20+
*/
21+
__attribute__((no_sanitize("address")))
22+
#endif
1623
{
1724
static const uint32_t K256 alignas(16) [] = {
1825
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,

0 commit comments

Comments
 (0)