Fix ubsan failure in android::base::Split.
ubsan doesn't like us incrementing std::string::npos, even if we won't use
the result.
Bug: http://b/28729303
Test: ran tests
Change-Id: I8227eca57dc6f3e49626c7025514caa04ef18f0a
diff --git a/base/Android.bp b/base/Android.bp
index b9a6e0b..a7600f3 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -37,6 +37,9 @@
cppflags: libbase_cppflags,
export_include_dirs: ["include"],
shared_libs: ["liblog"],
+ sanitize: {
+ misc_undefined: ["integer"],
+ },
target: {
android: {
srcs: [
@@ -86,6 +89,9 @@
"strings_test.cpp",
"test_main.cpp",
],
+ sanitize: {
+ misc_undefined: ["integer"],
+ },
target: {
android: {
srcs: ["properties_test.cpp"],