summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKrunal Bauskar <krunalbauskar@gmail.com>2020-07-29 23:27:25 +0800
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-30 15:44:54 +0300
commitc69520c9dfa6e4a26258842a1d3512c2b5d43d56 (patch)
treea3e5ddc790364cbf17efb0339010e3d0e95db980 /include
parentf99de8915e8f9109384d1f197ca69c747487cb48 (diff)
downloadmariadb-git-c69520c9dfa6e4a26258842a1d3512c2b5d43d56.tar.gz
MDEV-23030: ARM crash on Raspberry Pi 4
MariaDB adopted a hardware optimized crc32c approach on ARM64 starting 10.5. Said implementation of crc32c needs support from target hardware for crc32 and pmull instructions. Existing logic is checking only for crc32 support from target hardware through a runtime check and so if target hardware doesn't support pmull it would cause things to fail/crash. Expanded runtime check to ensure pmull support is also checked on the target hardware along with existing crc32. Thanks to Marko and Daniel for review.
Diffstat (limited to 'include')
-rw-r--r--include/my_sys.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 3acc1487f95..d2aaa5192a4 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -911,6 +911,9 @@ extern MYSQL_PLUGIN_IMPORT my_crc32_t my_checksum;
#if defined(__GNUC__) && defined(HAVE_ARMV8_CRC)
int crc32_aarch64_available(void);
+#if defined(HAVE_ARMV8_CRYPTO)
+int crc32c_aarch64_available(void);
+#endif
#endif
#ifdef DBUG_ASSERT_EXISTS