# Copyright (C) 2013 Samsung Electronics. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import logging import unittest from webkitpy.common.system.executive_mock import MockExecutive2 from webkitpy.common.system.filesystem_mock import MockFileSystem from webkitpy.common.system.outputcapture import OutputCapture from webkitpy.port.leakdetector_valgrind import LeakDetectorValgrind def make_mock_valgrind_output(process_name, pid, uuid): return """ 4 memcheck Memcheck, a memory error detector Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info Command: /home/user/WebKit/WebKitBuild/Release/Programs/{process_name} - {pid} 18577 memcheck /usr/bin/valgrind.bin --tool=memcheck --num-callers=40 --demangle=no --trace-children=no --smc-check=all-non-file --leak-check=yes --leak-resolution=high --show-possibly-lost=no --show-reachable=no --leak-check=full --undef-value-errors=no --gen-suppressions=all --xml=yes --xml-file=/home/user/WebKit/WebKitBuild/Release/layout-test-results/drt-{pid}-{uuid}-leaks.xml --suppressions=/home/user/WebKit/Tools/Scripts/valgrind/suppressions.txt --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp /home/user/WebKit/WebKitBuild/Release/Programs/{process_name} - RUNNING FINISHED 0x1a4 1 Leak_DefinitelyLost 8 bytes in 1 blocks are definitely lost in loss record 421 of 7,972 8 1 0x4C2AF8E /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so _Znwm 0x6839DEC /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS1_15ResourceRequestEPNS1_14DocumentLoaderEN3WTF10PassRefPtrINS1_9FormStateEEEPFvPvS5_SB_bESC_EUlNS1_12PolicyActionEE_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation 0x61E7B03 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 webkit_web_policy_decision_new 0x61CBA6D /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN6WebKit17FrameLoaderClient39dispatchDecidePolicyForNavigationActionERKN7WebCore16NavigationActionERKNS1_15ResourceRequestEN3WTF10PassRefPtrINS1_9FormStateEEESt8functionIFvNS1_12PolicyActionEEE 0x683DF52 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS_15ResourceRequestEPNS_14DocumentLoaderEN3WTF10PassRefPtrINS_9FormStateEEEPFvPvS3_S9_bESA_ 0x6817EFC /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore11FrameLoader22loadWithDocumentLoaderEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE 0x6818729 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE 0x6818A3A /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore11FrameLoader4loadERKNS_16FrameLoadRequestE 0x61E3148 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 webkit_web_frame_load_uri 0x44CBC9 /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree _ZL7runTestRKSs 0x44CED6 /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree _ZL20runTestingServerLoopv 0x43A2D3 /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree main insert_a_suppression_name_here Memcheck:Leak _Znwm _ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS1_15ResourceRequestEPNS1_14DocumentLoaderEN3WTF10PassRefPtrINS1_9FormStateEEEPFvPvS5_SB_bESC_EUlNS1_12PolicyActionEE_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation webkit_web_policy_decision_new _ZN6WebKit17FrameLoaderClient39dispatchDecidePolicyForNavigationActionERKN7WebCore16NavigationActionERKNS1_15ResourceRequestEN3WTF10PassRefPtrINS1_9FormStateEEESt8functionIFvNS1_12PolicyActionEEE _ZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS_15ResourceRequestEPNS_14DocumentLoaderEN3WTF10PassRefPtrINS_9FormStateEEEPFvPvS3_S9_bESA_ _ZN7WebCore11FrameLoader22loadWithDocumentLoaderEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE _ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE _ZN7WebCore11FrameLoader4loadERKNS_16FrameLoadRequestE webkit_web_frame_load_uri _ZL7runTestRKSs _ZL20runTestingServerLoopv main Memcheck:Leak fun:_Znwm fun:_ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS1_15ResourceRequestEPNS1_14DocumentLoaderEN3WTF10PassRefPtrINS1_9FormStateEEEPFvPvS5_SB_bESC_EUlNS1_12PolicyActionEE_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation fun:webkit_web_policy_decision_new fun:_ZN6WebKit17FrameLoaderClient39dispatchDecidePolicyForNavigationActionERKN7WebCore16NavigationActionERKNS1_15ResourceRequestEN3WTF10PassRefPtrINS1_9FormStateEEESt8functionIFvNS1_12PolicyActionEEE fun:_ZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS_15ResourceRequestEPNS_14DocumentLoaderEN3WTF10PassRefPtrINS_9FormStateEEEPFvPvS3_S9_bESA_ fun:_ZN7WebCore11FrameLoader22loadWithDocumentLoaderEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE fun:_ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE fun:_ZN7WebCore11FrameLoader4loadERKNS_16FrameLoadRequestE fun:webkit_web_frame_load_uri fun:_ZL7runTestRKSs fun:_ZL20runTestingServerLoopv fun:main }} ]]> 0x1a5 1 Leak_DefinitelyLost 8 bytes in 1 blocks are definitely lost in loss record 422 of 7,972 8 1 0x4C2AF8E /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so _Znwm 0x6839D0C /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker18checkContentPolicyERKNS1_16ResourceResponseEPFvPvNS1_12PolicyActionEES6_EUlS7_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation 0x61E7B03 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 webkit_web_policy_decision_new 0x61CB527 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN6WebKit17FrameLoaderClient31dispatchDecidePolicyForResponseERKN7WebCore16ResourceResponseERKNS1_15ResourceRequestESt8functionIFvNS1_12PolicyActionEEE 0x6839EC0 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore13PolicyChecker18checkContentPolicyERKNS_16ResourceResponseEPFvPvNS_12PolicyActionEES4_ 0x6802F6E /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore14DocumentLoader16responseReceivedEPNS_14CachedResourceERKNS_16ResourceResponseE 0x67E59E0 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore17CachedRawResource16responseReceivedERKNS_16ResourceResponseE 0x684C237 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore17SubresourceLoader18didReceiveResponseERKNS_16ResourceResponseE 0x6F95848 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCoreL19sendRequestCallbackEP8_GObjectP13_GAsyncResultPv 0x8E2D6CA /home/user/WebKit/WebKitBuild/Dependencies/Root/lib64/libgio-2.0.so.0.3800.0 g_task_return_now /home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/gio gtask.c 1108 0x8E2D6E8 /home/user/WebKit/WebKitBuild/Dependencies/Root/lib64/libgio-2.0.so.0.3800.0 complete_in_idle_cb /home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/gio gtask.c 1117 0x93A62F4 /home/user/WebKit/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0.3800.0 g_main_context_dispatch /home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/glib gmain.c 3065 0x93A6637 /home/user/WebKit/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0.3800.0 g_main_context_iterate.isra.23 /home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/glib gmain.c 3712 0x93A6A99 /home/user/WebKit/WebKitBuild/Dependencies/Root/lib64/libglib-2.0.so.0.3800.0 g_main_loop_run /home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/glib gmain.c 3906 0x8121204 /home/user/WebKit/WebKitBuild/Dependencies/Root/lib64/libgtk-3.so.0.600.0 gtk_main /home/user/WebKit/WebKitBuild/Dependencies/Source/gtk+-3.6.0/gtk gtkmain.c 1162 0x44CBCE /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree _ZL7runTestRKSs 0x44CED6 /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree _ZL20runTestingServerLoopv 0x43A2D3 /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree main insert_a_suppression_name_here Memcheck:Leak _Znwm _ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker18checkContentPolicyERKNS1_16ResourceResponseEPFvPvNS1_12PolicyActionEES6_EUlS7_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation webkit_web_policy_decision_new _ZN6WebKit17FrameLoaderClient31dispatchDecidePolicyForResponseERKN7WebCore16ResourceResponseERKNS1_15ResourceRequestESt8functionIFvNS1_12PolicyActionEEE _ZN7WebCore13PolicyChecker18checkContentPolicyERKNS_16ResourceResponseEPFvPvNS_12PolicyActionEES4_ _ZN7WebCore14DocumentLoader16responseReceivedEPNS_14CachedResourceERKNS_16ResourceResponseE _ZN7WebCore17CachedRawResource16responseReceivedERKNS_16ResourceResponseE _ZN7WebCore17SubresourceLoader18didReceiveResponseERKNS_16ResourceResponseE _ZN7WebCoreL19sendRequestCallbackEP8_GObjectP13_GAsyncResultPv g_task_return_now complete_in_idle_cb g_main_context_dispatch g_main_context_iterate.isra.23 g_main_loop_run gtk_main _ZL7runTestRKSs _ZL20runTestingServerLoopv main Memcheck:Leak fun:_Znwm fun:_ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker18checkContentPolicyERKNS1_16ResourceResponseEPFvPvNS1_12PolicyActionEES6_EUlS7_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation fun:webkit_web_policy_decision_new fun:_ZN6WebKit17FrameLoaderClient31dispatchDecidePolicyForResponseERKN7WebCore16ResourceResponseERKNS1_15ResourceRequestESt8functionIFvNS1_12PolicyActionEEE fun:_ZN7WebCore13PolicyChecker18checkContentPolicyERKNS_16ResourceResponseEPFvPvNS_12PolicyActionEES4_ fun:_ZN7WebCore14DocumentLoader16responseReceivedEPNS_14CachedResourceERKNS_16ResourceResponseE fun:_ZN7WebCore17CachedRawResource16responseReceivedERKNS_16ResourceResponseE fun:_ZN7WebCore17SubresourceLoader18didReceiveResponseERKNS_16ResourceResponseE fun:_ZN7WebCoreL19sendRequestCallbackEP8_GObjectP13_GAsyncResultPv fun:g_task_return_now fun:complete_in_idle_cb fun:g_main_context_dispatch fun:g_main_context_iterate.isra.23 fun:g_main_loop_run fun:gtk_main fun:_ZL7runTestRKSs fun:_ZL20runTestingServerLoopv fun:main }} ]]> 0x1a6 1 Leak_DefinitelyLost 8 bytes in 1 blocks are definitely lost in loss record 423 of 7,972 8 1 0x4C2AF8E /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so _Znwm 0x6839DEC /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS1_15ResourceRequestEPNS1_14DocumentLoaderEN3WTF10PassRefPtrINS1_9FormStateEEEPFvPvS5_SB_bESC_EUlNS1_12PolicyActionEE_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation 0x61E7B03 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 webkit_web_policy_decision_new 0x61CBA6D /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN6WebKit17FrameLoaderClient39dispatchDecidePolicyForNavigationActionERKN7WebCore16NavigationActionERKNS1_15ResourceRequestEN3WTF10PassRefPtrINS1_9FormStateEEESt8functionIFvNS1_12PolicyActionEEE 0x683DF52 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS_15ResourceRequestEPNS_14DocumentLoaderEN3WTF10PassRefPtrINS_9FormStateEEEPFvPvS3_S9_bESA_ 0x6817EFC /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore11FrameLoader22loadWithDocumentLoaderEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE 0x6818729 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE 0x6818A3A /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 _ZN7WebCore11FrameLoader4loadERKNS_16FrameLoadRequestE 0x61E3148 /home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3 webkit_web_frame_load_uri 0x44CC50 /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree _ZL7runTestRKSs 0x44CED6 /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree _ZL20runTestingServerLoopv 0x43A2D3 /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree main insert_a_suppression_name_here Memcheck:Leak _Znwm _ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS1_15ResourceRequestEPNS1_14DocumentLoaderEN3WTF10PassRefPtrINS1_9FormStateEEEPFvPvS5_SB_bESC_EUlNS1_12PolicyActionEE_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation webkit_web_policy_decision_new _ZN6WebKit17FrameLoaderClient39dispatchDecidePolicyForNavigationActionERKN7WebCore16NavigationActionERKNS1_15ResourceRequestEN3WTF10PassRefPtrINS1_9FormStateEEESt8functionIFvNS1_12PolicyActionEEE _ZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS_15ResourceRequestEPNS_14DocumentLoaderEN3WTF10PassRefPtrINS_9FormStateEEEPFvPvS3_S9_bESA_ _ZN7WebCore11FrameLoader22loadWithDocumentLoaderEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE _ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE _ZN7WebCore11FrameLoader4loadERKNS_16FrameLoadRequestE webkit_web_frame_load_uri _ZL7runTestRKSs _ZL20runTestingServerLoopv main Memcheck:Leak fun:_Znwm fun:_ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS1_15ResourceRequestEPNS1_14DocumentLoaderEN3WTF10PassRefPtrINS1_9FormStateEEEPFvPvS5_SB_bESC_EUlNS1_12PolicyActionEE_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation fun:webkit_web_policy_decision_new fun:_ZN6WebKit17FrameLoaderClient39dispatchDecidePolicyForNavigationActionERKN7WebCore16NavigationActionERKNS1_15ResourceRequestEN3WTF10PassRefPtrINS1_9FormStateEEESt8functionIFvNS1_12PolicyActionEEE fun:_ZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS_15ResourceRequestEPNS_14DocumentLoaderEN3WTF10PassRefPtrINS_9FormStateEEEPFvPvS3_S9_bESA_ fun:_ZN7WebCore11FrameLoader22loadWithDocumentLoaderEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE fun:_ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE fun:_ZN7WebCore11FrameLoader4loadERKNS_16FrameLoadRequestE fun:webkit_web_frame_load_uri fun:_ZL7runTestRKSs fun:_ZL20runTestingServerLoopv fun:main }} ]]> 107 FcConfigAppFontAddFile (Third Party) 2098 gtk_init_check (Third Party) 1 g_quark_from_static_string (Third party) 27 FcConfigParseAndLoad (Third Party) 80 webkitAccessibleNew 177 g_thread_proxy (Third Party) 9 FcPatternObjectInsertElt 2 (Third Party) 1 gtk_window_realize (Third Party) 1 __nss_database_lookup (Third Party) 1 cairo_set_source_surface (Third Party) 2 libGL.so (Third party) 1 g_task_run_in_thread (Third Party) 2 WTF::ThreadIdentifierData::initialize() (Intentional) 1 gtk_css_provider_load_from_data (Third Party) 1 libenchant.so new (Third party) """.format(process_name=process_name, pid=pid, uuid=uuid) def make_mock_incomplete_valgrind_output(process_name, pid, uuid): return """ 4 memcheck Memcheck, a memory error detector Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info Command: /home/user/WebKit/WebKitBuild/Release/Programs/{process_name} - {pid} 18577 memcheck /usr/bin/valgrind.bin --tool=memcheck --num-callers=40 --demangle=no --trace-children=no --smc-check=all-non-file --leak-check=yes --leak-resolution=high --show-possibly-lost=no --show-reachable=no --leak-check=full --undef-value-errors=no --gen-suppressions=all --xml=yes --xml-file=/home/user/WebKit/WebKitBuild/Release/layout-test-results/drt-{pid}-{uuid}-leaks.xml --suppressions=/home/user/WebKit/Tools/Scripts/valgrind/suppressions.txt --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp /home/user/WebKit/WebKitBuild/Release/Programs/{process_name} - RUNNING """.format(process_name=process_name, pid=pid, uuid=uuid) def make_mock_valgrind_results(): return """----------------------------------------------------- Suppressions used: count name 2 __nss_database_lookup (Third Party) 2 cairo_set_source_surface (Third Party) 2 g_quark_from_static_string (Third party) 2 g_task_run_in_thread (Third Party) 2 gtk_css_provider_load_from_data (Third Party) 2 gtk_window_realize (Third Party) 2 libenchant.so new (Third party) 4 WTF::ThreadIdentifierData::initialize() (Intentional) 4 libGL.so (Third party) 18 FcPatternObjectInsertElt 2 (Third Party) 54 FcConfigParseAndLoad (Third Party) 160 webkitAccessibleNew 214 FcConfigAppFontAddFile (Third Party) 354 g_thread_proxy (Third Party) 4196 gtk_init_check (Third Party) ----------------------------------------------------- Valgrind detected 2 leaks: Leak_DefinitelyLost 8 bytes in 1 blocks are definitely lost in loss record 421 of 7,972 operator new(unsigned long) (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) std::_Function_base::_Base_manager, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr, bool), void*)::{lambda(WebCore::PolicyAction)#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr, bool), void*)::{lambda(WebCore::PolicyAction)#1}> const&, std::_Manager_operation) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) webkit_web_policy_decision_new (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WTF::PassRefPtr, std::function) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr, bool), void*) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::FrameLoader::load(WebCore::DocumentLoader*) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::FrameLoader::load(WebCore::FrameLoadRequest const&) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) webkit_web_frame_load_uri (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) runTest(std::basic_string, std::allocator > const&) (/home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree) runTestingServerLoop() (/home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree) main (/home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree) Suppression (error hash=#0449D3ED253FE1F9#): { Memcheck:Leak fun:_Znw* fun:_ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS1_15ResourceRequestEPNS1_14DocumentLoaderEN3WTF10PassRefPtrINS1_9FormStateEEEPFvPvS5_SB_bESC_EUlNS1_12PolicyActionEE_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation fun:webkit_web_policy_decision_new fun:_ZN6WebKit17FrameLoaderClient39dispatchDecidePolicyForNavigationActionERKN7WebCore16NavigationActionERKNS1_15ResourceRequestEN3WTF10PassRefPtrINS1_9FormStateEEESt8functionIFvNS1_12PolicyActionEEE fun:_ZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS_15ResourceRequestEPNS_14DocumentLoaderEN3WTF10PassRefPtrINS_9FormStateEEEPFvPvS3_S9_bESA_ fun:_ZN7WebCore11FrameLoader22loadWithDocumentLoaderEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE fun:_ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE fun:_ZN7WebCore11FrameLoader4loadERKNS_16FrameLoadRequestE fun:webkit_web_frame_load_uri fun:_ZL7runTestRKSs fun:_ZL20runTestingServerLoopv fun:main } Leak_DefinitelyLost 8 bytes in 1 blocks are definitely lost in loss record 422 of 7,972 operator new(unsigned long) (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) std::_Function_base::_Base_manager::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager const&, std::_Manager_operation) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) webkit_web_policy_decision_new (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebKit::FrameLoaderClient::dispatchDecidePolicyForResponse(WebCore::ResourceResponse const&, WebCore::ResourceRequest const&, std::function) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::PolicyChecker::checkContentPolicy(WebCore::ResourceResponse const&, void (*)(void*, WebCore::PolicyAction), void*) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::CachedRawResource::responseReceived(WebCore::ResourceResponse const&) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) WebCore::sendRequestCallback(_GObject*, _GAsyncResult*, void*) (/home/user/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.3) g_task_return_now (/home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/gio/gtask.c:1108) complete_in_idle_cb (/home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/gio/gtask.c:1117) g_main_context_dispatch (/home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/glib/gmain.c:3065) g_main_context_iterate.isra.23 (/home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/glib/gmain.c:3712) g_main_loop_run (/home/user/WebKit/WebKitBuild/Dependencies/Source/glib-2.38.0/glib/gmain.c:3906) gtk_main (/home/user/WebKit/WebKitBuild/Dependencies/Source/gtk+-3.6.0/gtk/gtkmain.c:1162) runTest(std::basic_string, std::allocator > const&) (/home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree) runTestingServerLoop() (/home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree) main (/home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree) Suppression (error hash=#8313DEB16B069438#): { Memcheck:Leak fun:_Znw* fun:_ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker18checkContentPolicyERKNS1_16ResourceResponseEPFvPvNS1_12PolicyActionEES6_EUlS7_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation fun:webkit_web_policy_decision_new fun:_ZN6WebKit17FrameLoaderClient31dispatchDecidePolicyForResponseERKN7WebCore16ResourceResponseERKNS1_15ResourceRequestESt8functionIFvNS1_12PolicyActionEEE fun:_ZN7WebCore13PolicyChecker18checkContentPolicyERKNS_16ResourceResponseEPFvPvNS_12PolicyActionEES4_ fun:_ZN7WebCore14DocumentLoader16responseReceivedEPNS_14CachedResourceERKNS_16ResourceResponseE fun:_ZN7WebCore17CachedRawResource16responseReceivedERKNS_16ResourceResponseE fun:_ZN7WebCore17SubresourceLoader18didReceiveResponseERKNS_16ResourceResponseE fun:_ZN7WebCoreL19sendRequestCallbackEP8_GObjectP13_GAsyncResultPv fun:g_task_return_now fun:complete_in_idle_cb fun:g_main_context_dispatch fun:g_main_context_iterate.isra.23 fun:g_main_loop_run fun:gtk_main fun:_ZL7runTestRKSs fun:_ZL20runTestingServerLoopv fun:main } """ valgrind_output_cppfilt_map = { '_Znwm': u'operator new(unsigned long)', '_ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS1_15ResourceRequestEPNS1_14DocumentLoaderEN3WTF10PassRefPtrINS1_9FormStateEEEPFvPvS5_SB_bESC_EUlNS1_12PolicyActionEE_E10_M_managerERSt9_Any_dataRKSI_St18_Manager_operation': u'std::_Function_base::_Base_manager, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr, bool), void*)::{lambda(WebCore::PolicyAction)#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr, bool), void*)::{lambda(WebCore::PolicyAction)#1}> const&, std::_Manager_operation)', 'webkit_web_policy_decision_new': u'webkit_web_policy_decision_new', '_ZN6WebKit17FrameLoaderClient39dispatchDecidePolicyForNavigationActionERKN7WebCore16NavigationActionERKNS1_15ResourceRequestEN3WTF10PassRefPtrINS1_9FormStateEEESt8functionIFvNS1_12PolicyActionEEE': u'WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WTF::PassRefPtr, std::function)', '_ZN7WebCore13PolicyChecker21checkNavigationPolicyERKNS_15ResourceRequestEPNS_14DocumentLoaderEN3WTF10PassRefPtrINS_9FormStateEEEPFvPvS3_S9_bESA_': u'WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr, bool), void*)', '_ZN7WebCore11FrameLoader22loadWithDocumentLoaderEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE': u'WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr)', '_ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE': u'WebCore::FrameLoader::load(WebCore::DocumentLoader*)', '_ZN7WebCore11FrameLoader4loadERKNS_16FrameLoadRequestE': u'WebCore::FrameLoader::load(WebCore::FrameLoadRequest const&)', 'webkit_web_frame_load_uri': u'webkit_web_frame_load_uri', '_ZL7runTestRKSs': u'runTest(std::basic_string, std::allocator > const&)', '_ZL20runTestingServerLoopv': u'runTestingServerLoop()', 'main': u'main', '_ZNSt14_Function_base13_Base_managerIZN7WebCore13PolicyChecker18checkContentPolicyERKNS1_16ResourceResponseEPFvPvNS1_12PolicyActionEES6_EUlS7_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation': u'std::_Function_base::_Base_manager::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager const&, std::_Manager_operation)', 'webkit_web_policy_decision_new': u'webkit_web_policy_decision_new', '_ZN6WebKit17FrameLoaderClient31dispatchDecidePolicyForResponseERKN7WebCore16ResourceResponseERKNS1_15ResourceRequestESt8functionIFvNS1_12PolicyActionEEE': u'WebKit::FrameLoaderClient::dispatchDecidePolicyForResponse(WebCore::ResourceResponse const&, WebCore::ResourceRequest const&, std::function)', '_ZN7WebCore13PolicyChecker18checkContentPolicyERKNS_16ResourceResponseEPFvPvNS_12PolicyActionEES4_': u'WebCore::PolicyChecker::checkContentPolicy(WebCore::ResourceResponse const&, void (*)(void*, WebCore::PolicyAction), void*)', '_ZN7WebCore14DocumentLoader16responseReceivedEPNS_14CachedResourceERKNS_16ResourceResponseE': u'WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&)', '_ZN7WebCore17CachedRawResource16responseReceivedERKNS_16ResourceResponseE': u'WebCore::CachedRawResource::responseReceived(WebCore::ResourceResponse const&)', '_ZN7WebCore17SubresourceLoader18didReceiveResponseERKNS_16ResourceResponseE': u'WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&)', '_ZN7WebCoreL19sendRequestCallbackEP8_GObjectP13_GAsyncResultPv': u'WebCore::sendRequestCallback(_GObject*, _GAsyncResult*, void*)', 'g_task_return_now': u'g_task_return_now', 'complete_in_idle_cb': u'complete_in_idle_cb', 'g_main_context_dispatch': u'g_main_context_dispatch', 'g_main_context_iterate.isra.23': u'g_main_context_iterate.isra.23', 'g_main_loop_run': u'g_main_loop_run', 'gtk_main': u'gtk_main', } def make_mock_valgrind_results_incomplete(): return """could not parse 4 memcheck Memcheck, a memory error detector Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info Command: /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree - 28531 18577 memcheck /usr/bin/valgrind.bin --tool=memcheck --num-callers=40 --demangle=no --trace-children=no --smc-check=all-non-file --leak-check=yes --leak-resolution=high --show-possibly-lost=no --show-reachable=no --leak-check=full --undef-value-errors=no --gen-suppressions=all --xml=yes --xml-file=/home/user/WebKit/WebKitBuild/Release/layout-test-results/drt-28531-e8c7d7b83be411e390c9d43d7e01ba08-leaks.xml --suppressions=/home/user/WebKit/Tools/Scripts/valgrind/suppressions.txt --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp /home/user/WebKit/WebKitBuild/Release/Programs/DumpRenderTree - RUNNING : no element found: line 49, column 0 ----------------------------------------------------- Suppressions used: count name ----------------------------------------------------- """ def make_mock_valgrind_results_empty(): return """could not parse : no element found: line 1, column 0 ----------------------------------------------------- Suppressions used: count name ----------------------------------------------------- """ def make_mock_valgrind_results_misformatted(): return """could not parse Junk that should not appear in a valgrind xml file