Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_initialize_ebpf_object_from_native_file leaks under fault injection #2249

Closed
Alan-Jowett opened this issue Mar 27, 2023 · 1 comment
Closed
Assignees

Comments

@Alan-Jowett
Copy link
Member

Leak of memory allocated from:

    [0]              : "Leak of 9 bytes at 2287060384960." 
    [1]              : "    ebpf_allocate + 190 (D:\a\ebpf-for-windows\ebpf-for-windows\libs\platform\user\ebpf_platform_user.cpp:396)." 
    [2]              : "    ebpf_duplicate_string + 74 (D:\a\ebpf-for-windows\ebpf-for-windows\libs\platform\ebpf_object.c:394)." 
    [3]              : "    _initialize_ebpf_object_from_native_file + 496 (D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\ebpf_api.cpp:1724)." 
    [4]              : "    _initialize_ebpf_object_from_file + 230 (D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\ebpf_api.cpp:1815)." 
    [5]              : "    ebpf_object_open + 800 (D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\ebpf_api.cpp:2307)." 
    [6]              : "    bpf_object__open_file + 247 (D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\libbpf_object.cpp:101)." 
    [7]              : "    bpf_object__open + 22 (D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\libbpf_object.cpp:90)." 
    [8]              : "    _array_of_maps2_test + 312 (D:\a\ebpf-for-windows\ebpf-for-windows\tests\unit\libbpf_test.cpp:1649)." 
    [9]              : "    CATCH2_INTERNAL_TEST_80 + 16 (D:\a\ebpf-for-windows\ebpf-for-windows\tests\unit\libbpf_test.cpp:1697)." 
    [10]             : "    Catch::`anonymous namespace'::TestInvokerAsFunction::invoke + 18 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_test_registry.cpp:58)." 
    [11]             : "    Catch::TestCaseHandle::invoke + 33 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\catch_test_case_info.hpp:116)." 
    [12]             : "    Catch::RunContext::invokeActiveTestCase + 71 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_run_context.cpp:544)." 
    [13]             : "    Catch::RunContext::runCurrentTest + 592 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_run_context.cpp:509)." 
    [14]             : "    Catch::RunContext::runTest + 738 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_run_context.cpp:239)." 
    [15]             : "    Catch::`anonymous namespace'::TestGroup::execute + 243 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\catch_session.cpp:111)." 
    [16]             : "    Catch::Session::runInternal + 1008 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\catch_session.cpp:336)." 
    [17]             : "    Catch::Session::run + 80 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\catch_session.cpp:264)." 
    [18]             : "    Catch::Session::run<char> + 82 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\catch_session.hpp:41)." 
    [19]             : "    main + 97 (D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_main.cpp:36)." 
    [20]             : "    invoke_main + 57 (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)." 
    [21]             : "    __scrt_common_main_seh + 302 (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)." 
    [22]             : "    __scrt_common_main + 14 (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)." 
    [23]             : "    mainCRTStartup + 14 (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)." 
    [24]             : "    BaseThreadInitThunk + 16." 
    [25]             : "    RtlUserThreadStart + 43." 

When fault injected at:

    [0]              : "ebpf_allocate + 72 D:\a\ebpf-for-windows\ebpf-for-windows\libs\platform\user\ebpf_platform_user.cpp 384" 
    [1]              : "ebpf_duplicate_string + 74 D:\a\ebpf-for-windows\ebpf-for-windows\libs\platform\ebpf_object.c 394" 
    [2]              : "_initialize_ebpf_object_from_native_file + 560 D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\ebpf_api.cpp 1730" 
    [3]              : "_initialize_ebpf_object_from_file + 230 D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\ebpf_api.cpp 1815" 
    [4]              : "ebpf_object_open + 800 D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\ebpf_api.cpp 2307" 
    [5]              : "bpf_object__open_file + 247 D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\libbpf_object.cpp 101" 
    [6]              : "bpf_object__open + 22 D:\a\ebpf-for-windows\ebpf-for-windows\libs\api\libbpf_object.cpp 90" 
    [7]              : "_array_of_maps2_test + 312 D:\a\ebpf-for-windows\ebpf-for-windows\tests\unit\libbpf_test.cpp 1649" 
    [8]              : "CATCH2_INTERNAL_TEST_80 + 16 D:\a\ebpf-for-windows\ebpf-for-windows\tests\unit\libbpf_test.cpp 1697" 
    [9]              : "Catch::`anonymous namespace'::TestInvokerAsFunction::invoke + 18 D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_test_registry.cpp 58" 
    [10]             : "Catch::TestCaseHandle::invoke + 33 D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\catch_test_case_info.hpp 116" 
    [11]             : "Catch::RunContext::invokeActiveTestCase + 71 D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_run_context.cpp 544" 
    [12]             : "Catch::RunContext::runCurrentTest + 592 D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_run_context.cpp 509" 
    [13]             : "Catch::RunContext::runTest + 738 D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\internal\catch_run_context.cpp 239" 
    [14]             : "Catch::`anonymous namespace'::TestGroup::execute + 243 D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\catch_session.cpp 111" 
    [15]             : "Catch::Session::runInternal + 1008 D:\a\ebpf-for-windows\ebpf-for-windows\external\Catch2\src\catch2\catch_session.cpp 336" 
@saxena-anurag saxena-anurag self-assigned this Mar 27, 2023
@saxena-anurag
Copy link
Contributor

Fixed by #2253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants