Fix some issues reported by Valgrind
* Update the target suppression file.
* Disable the detection of mismatched free() / delete / delete []
calls, since it results in a lot of false positives (a known
Valgrind limitation associated with asymmetric inlining of
operator new() and operator delete()).
* Avoid a memory leak in the code generator tests, caused by the
fact that the VIXL-based ARM code generator does not always use
the arena allocator.
* Fix an access to uninitialized memory.
Test: m valgrind-test-art-target
Test: valgrind --leak-check=full --show-mismatched-frees=no \
--ignore-range-below-sp=1024-1 \
--suppressions=valgrind-target-suppressions.txt \
dalvikvm ...
Change-Id: I891a3247aa9828226b4e62c69d6e1c8398d757b8
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index bd7f900..5bdfbc7 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -332,7 +332,7 @@
(adb shell "$(GCOV_ENV) LD_LIBRARY_PATH=$(4) ANDROID_ROOT=$(ART_GTEST_TARGET_ANDROID_ROOT) \
valgrind --leak-check=full --error-exitcode=1 --workaround-gcc296-bugs=yes \
--suppressions=$(ART_TARGET_TEST_DIR)/valgrind-target-suppressions.txt \
- --num-callers=50 \
+ --num-callers=50 --show-mismatched-frees=no \
$$(PRIVATE_TARGET_EXE) && touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID" \
&& (adb pull $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID /tmp/ \
&& $$(call ART_TEST_PASSED,$$@)) \