[Tarantool-patches] [PATCH 04/10] crc32: disable align sanitizer

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu May 21 23:37:27 MSK 2020


There is some assembly working with a byte array like with an
array of unsigned long values. Better allow it to continue
working like that with disabled sanitizer, than accidentally
break or slow down something here.

Part of #4609
---
I am sure there is a way to fix it instead of muting, but I don't
know how. Probably there is someone, who understands what is
written in this assembly code, and can help.

 src/cpu_feature.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cpu_feature.c b/src/cpu_feature.c
index 98567ccb3..09b6c84ee 100644
--- a/src/cpu_feature.c
+++ b/src/cpu_feature.c
@@ -29,6 +29,7 @@
  * SUCH DAMAGE.
  */
 #include "trivia/config.h"
+#include "trivia/util.h"
 #include <sys/types.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -65,7 +66,7 @@ crc32c_hw_byte(uint32_t crc, unsigned char const *data, unsigned int length)
 }
 
 
-uint32_t
+NOSANITIZE_ALIGN uint32_t
 crc32c_hw(uint32_t crc, const char *buf, unsigned int len)
 {
 	unsigned int iquotient = len / SCALE_F;
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list