diff options
-rw-r--r-- | ppapi/tests/test_char_set.cc | 8 | ||||
-rw-r--r-- | tools/valgrind/memcheck/suppressions.txt | 41 |
2 files changed, 8 insertions, 41 deletions
diff --git a/ppapi/tests/test_char_set.cc b/ppapi/tests/test_char_set.cc index 05e32c9..868c350 100644 --- a/ppapi/tests/test_char_set.cc +++ b/ppapi/tests/test_char_set.cc @@ -103,6 +103,8 @@ std::string TestCharSet::TestUTF16ToCharSet() { } std::string TestCharSet::TestCharSetToUTF16() { + pp::Memory_Dev memory; + // Empty string. uint32_t utf16result_len; uint16_t* utf16result = char_set_interface_->CharSetToUTF16( @@ -111,6 +113,7 @@ std::string TestCharSet::TestCharSetToUTF16() { ASSERT_TRUE(utf16result); ASSERT_TRUE(utf16result_len == 0); ASSERT_TRUE(utf16result[0] == 0); + memory.MemFree(utf16result); // Basic Latin1. char latin1[] = "H\xef"; @@ -121,6 +124,7 @@ std::string TestCharSet::TestCharSetToUTF16() { ASSERT_TRUE(utf16result_len == 2); ASSERT_TRUE(utf16result[0] == 'H' && utf16result[1] == 0xef && utf16result[2] == 0); + memory.MemFree(utf16result); // Invalid input encoding with FAIL. char badutf8[] = "A\xe4Z"; @@ -129,6 +133,7 @@ std::string TestCharSet::TestCharSetToUTF16() { PP_CHARSET_CONVERSIONERROR_FAIL, &utf16result_len); ASSERT_TRUE(!utf16result); ASSERT_TRUE(utf16result_len == 0); + memory.MemFree(utf16result); // Invalid input with SKIP. utf16result = char_set_interface_->CharSetToUTF16( @@ -138,6 +143,7 @@ std::string TestCharSet::TestCharSetToUTF16() { ASSERT_TRUE(utf16result_len == 2); ASSERT_TRUE(utf16result[0] == 'A' && utf16result[1] == 'Z' && utf16result[2] == 0); + memory.MemFree(utf16result); // Invalid input with SUBSTITUTE. utf16result = char_set_interface_->CharSetToUTF16( @@ -147,6 +153,7 @@ std::string TestCharSet::TestCharSetToUTF16() { ASSERT_TRUE(utf16result_len == 3); ASSERT_TRUE(utf16result[0] == 'A' && utf16result[1] == 0xFFFD && utf16result[2] == 'Z' && utf16result[3] == 0); + memory.MemFree(utf16result); // Invalid encoding name. utf16result = char_set_interface_->CharSetToUTF16( @@ -154,6 +161,7 @@ std::string TestCharSet::TestCharSetToUTF16() { PP_CHARSET_CONVERSIONERROR_SUBSTITUTE, &utf16result_len); ASSERT_TRUE(!utf16result); ASSERT_TRUE(utf16result_len == 0); + memory.MemFree(utf16result); PASS(); } diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index f05e46f0..6f36a4f 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt @@ -4037,47 +4037,6 @@ fun:_ZN4base10WorkerPool8PostTaskERKN15tracked_objects8Location* } { - bug_90644_a - Memcheck:Leak - fun:malloc - fun:_ZN*ppapi12_GLOBAL__N_18MemAllocEj - fun:_ZN5ppapi11CharSetImpl14CharSetToUTF16*26PP_CharSet_ConversionErrorPj - fun:_ZN5ppapi5thunk12_GLOBAL__N_114CharSetToUTF16EiPKcjS3_26PP_CharSet_ConversionErrorPj - ... - fun:_Z24PP_RunCompletionCallbackP21PP_CompletionCallbacki - fun:_ZN*pp*5proxy12_GLOBAL__N_115CallbackWrapperE21PP_CompletionCallbacki -} -{ - bug_90644_b - Memcheck:Leak - fun:_Znw* - fun:_ZN2pp5proxy16PluginVarTracker10MakeStringEPKcj - fun:_ZN2pp5proxy16PluginVarTracker10MakeStringERKSs - fun:_ZN2pp5proxy27PluginVarSerializationRules23BeginReceiveCallerOwnedERK6PP_VarPKSsPNS0_10DispatcherE - fun:_ZN2pp5proxy31SerializedVarVectorReceiveInput3GetEPNS0_10DispatcherEPj - fun:_ZN2pp5proxy15PPP_Class_Proxy9OnMsgCallExxNS0_25SerializedVarReceiveInputENS0_31SerializedVarVectorReceiveInputENS0_21SerializedVarOutParamENS0_24SerializedVarReturnValueE -} -{ - bug_90644_c - Memcheck:Leak - fun:malloc - fun:_ZN5ppapi5proxy12_GLOBAL__N_18MemAllocEj - fun:_ZN5ppapi11CharSetImpl14CharSetToUTF16EPK14PPB_Memory_DevPKcjS5_26PP_CharSet_ConversionErrorPj - fun:_ZN5ppapi5proxy17PPB_CharSet_Proxy14CharSetToUTF16EiPKcjS3_26PP_CharSet_ConversionErrorPj - fun:_ZN5ppapi5thunk12_GLOBAL__N_114CharSetToUTF16EiPKcjS3_26PP_CharSet_ConversionErrorPj - fun:_ZN11TestCharSet18TestCharSetToUTF16Ev -} -{ - bug_90644_d - Memcheck:Leak - fun:malloc - fun:_ZN5ppapi12_GLOBAL__N_18MemAllocEj - fun:_ZN5ppapi11CharSetImpl14CharSetToUTF16EPKcjS2_26PP_CharSet_ConversionErrorPj - fun:_ZN5ppapi5thunk12_GLOBAL__N_114CharSetToUTF16EiPKcjS3_26PP_CharSet_ConversionErrorPj - fun:_ZN11TestCharSet18TestCharSetToUTF16Ev - fun:_ZN11TestCharSet7RunTestEv -} -{ bug_90671 Memcheck:Leak fun:_Znw* |