Temporarily fall back to non-V memcmp
Investigation revealed that the vector instructions in the assembly
implementation of memcmp seem to be putting QEMU into a bad state. This
code sometimes results in a SIGILL.
Temporarily disable the vector instructions for just this function.
Bug: 306514350
Test: Verified boot on AOSP CF image.
Change-Id: I184762354092b4b500c78a29a10db18cef0dab90
diff --git a/libc/Android.bp b/libc/Android.bp
index 390cc0c..1fd8847 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -641,6 +641,7 @@
// automatically included.
cc_library_static {
defaults: ["libc_defaults"],
+ tidy_disabled_srcs: ["upstream-*/**/*.c"],
srcs: [
// These two depend on getentropy, which isn't in libc_ndk.a.
"upstream-openbsd/lib/libc/crypt/arc4random.c",
@@ -910,11 +911,14 @@
"arch-riscv64/bionic/syscall.S",
"arch-riscv64/bionic/vfork.S",
+ // TODO(b/306514350): Remove this and replace with the optimized
+ // version once the bug is resolved.
+ "upstream-freebsd/lib/libc/string/memcmp.c",
+
"bionic/strchrnul.cpp",
"bionic/strrchr.cpp",
"arch-riscv64/string/memchr.S",
- "arch-riscv64/string/memcmp.S",
"arch-riscv64/string/memcpy.S",
"arch-riscv64/string/memmove.S",
"arch-riscv64/string/memset.S",