Skip to content

Instantly share code, notes, and snippets.

@pjh
Created December 2, 2023 01:01
Show Gist options
  • Save pjh/5026217ec5faa84c45bd277d57af7bea to your computer and use it in GitHub Desktop.
Save pjh/5026217ec5faa84c45bd277d57af7bea to your computer and use it in GitHub Desktop.
==2221933== Memcheck, a memory error detector
==2221933== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==2221933== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==2221933== Command: ./bazel-bin/ortools/base/hello_file
==2221933==
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1701478876.944673 2221933 hello_file.cc:26] got back contents: hello file
==2221933==
==2221933== HEAP SUMMARY:
==2221933== in use at exit: 480 bytes in 13 blocks
==2221933== total heap usage: 31 allocs, 18 frees, 115,474 bytes allocated
==2221933==
==2221933== 24 bytes in 1 blocks are definitely lost in loss record 8 of 13
==2221933== at 0x4840F2F: operator new(unsigned long) (vg_replace_malloc.c:422)
==2221933== by 0x12762B: File::Open(char const*, char const*) (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933== by 0x129A09: File::Open(std::basic_string_view<char, std::char_traits<char> > const&, char const*) (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933== by 0x127A18: file::Open(std::basic_string_view<char, std::char_traits<char> > const&, std::basic_string_view<char, std::char_traits<char> > const&, File**, int) (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933== by 0x1282F8: file::SetContents(std::basic_string_view<char, std::char_traits<char> > const&, std::basic_string_view<char, std::char_traits<char> > const&, int) (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933== by 0x126949: main (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933==
==2221933== 24 bytes in 1 blocks are definitely lost in loss record 9 of 13
==2221933== at 0x4840F2F: operator new(unsigned long) (vg_replace_malloc.c:422)
==2221933== by 0x12762B: File::Open(char const*, char const*) (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933== by 0x129A09: File::Open(std::basic_string_view<char, std::char_traits<char> > const&, char const*) (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933== by 0x127A18: file::Open(std::basic_string_view<char, std::char_traits<char> > const&, std::basic_string_view<char, std::char_traits<char> > const&, File**, int) (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933== by 0x127EA9: file::GetContents(std::basic_string_view<char, std::char_traits<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int) (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933== by 0x126A1B: main (in /usr/local/google/home/peterhornyack/.cache/bazel/_bazel_peterhornyack/b043a564ad2adc01f841d12814cb8aab/execroot/com_google_ortools/bazel-out/k8-fastbuild/bin/ortools/base/hello_file)
==2221933==
==2221933== LEAK SUMMARY:
==2221933== definitely lost: 48 bytes in 2 blocks
==2221933== indirectly lost: 0 bytes in 0 blocks
==2221933== possibly lost: 0 bytes in 0 blocks
==2221933== still reachable: 432 bytes in 11 blocks
==2221933== of which reachable via heuristic:
==2221933== newarray : 200 bytes in 1 blocks
==2221933== suppressed: 0 bytes in 0 blocks
==2221933== Reachable blocks (those to which a pointer was found) are not shown.
==2221933== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==2221933==
==2221933== For lists of detected and suppressed errors, rerun with: -s
==2221933== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment