Skip to content

Instantly share code, notes, and snippets.

@tschak909
Created May 13, 2024 23:12
Show Gist options
  • Select an option

  • Save tschak909/a86be2486988de04427fbf5a72f843be to your computer and use it in GitHub Desktop.

Select an option

Save tschak909/a86be2486988de04427fbf5a72f843be to your computer and use it in GitHub Desktop.
Valgrind report for fujinet-pc.
==2402562== Conditional jump or move depends on uninitialised value(s)
==2402562== at 0x164871: tnfs_umount(tnfsMountInfo*) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x15827F: FileSystemTNFS::~FileSystemTNFS() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1B6C56: fujiHost::set_type(fujiHostType) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1E9FD0: iwmFuji::~iwmFuji() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x4C28494: __run_exit_handlers (exit.c:113)
==2402562== by 0x4C2860F: exit (exit.c:143)
==2402562== by 0x4C0CD96: (below main) (libc_start_call_main.h:74)
==2402562==
Ending request thread
==2402562== Invalid read of size 8
==2402562== at 0x1B934C: iwm_slip::end_request_thread() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1B9469: iwm_slip::~iwm_slip() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x4C28494: __run_exit_handlers (exit.c:113)
==2402562== by 0x4C2860F: exit (exit.c:143)
==2402562== by 0x4C0CD96: (below main) (libc_start_call_main.h:74)
==2402562== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==2402562==
==2402562==
==2402562== Process terminating with default action of signal 11 (SIGSEGV)
==2402562== Access not within mapped region at address 0x0
==2402562== at 0x1B934C: iwm_slip::end_request_thread() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1B9469: iwm_slip::~iwm_slip() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x4C28494: __run_exit_handlers (exit.c:113)
==2402562== by 0x4C2860F: exit (exit.c:143)
==2402562== by 0x4C0CD96: (below main) (libc_start_call_main.h:74)
==2402562== If you believe this happened as a result of a stack
==2402562== overflow in your program's main thread (unlikely but
==2402562== possible), you can try to increase the size of the
==2402562== main thread stack using the --main-stacksize= flag.
==2402562== The main thread stack size used in this run was 8388608.
==2402562==
==2402562== HEAP SUMMARY:
==2402562== in use at exit: 4,916,547 bytes in 358 blocks
==2402562== total heap usage: 460,139 allocs, 459,781 frees, 79,455,899 bytes allocated
==2402562==
==2402562== 304 bytes in 1 blocks are possibly lost in loss record 49 of 83
==2402562== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2402562== by 0x40147D9: calloc (rtld-malloc.h:44)
==2402562== by 0x40147D9: allocate_dtv (dl-tls.c:375)
==2402562== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634)
==2402562== by 0x4C787B4: allocate_stack (allocatestack.c:430)
==2402562== by 0x4C787B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647)
==2402562== by 0x498A328: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==2402562== by 0x1F6828: TCPConnection::create_read_channel() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1F6098: connector_net::create_connection() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1B97A1: iwm_slip::setup_spi() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1BAF51: iwmBus::setup() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x131F34: main_setup(int, char**) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x130DA0: main (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562==
==2402562== 304 bytes in 1 blocks are possibly lost in loss record 50 of 83
==2402562== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2402562== by 0x40147D9: calloc (rtld-malloc.h:44)
==2402562== by 0x40147D9: allocate_dtv (dl-tls.c:375)
==2402562== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634)
==2402562== by 0x4C787B4: allocate_stack (allocatestack.c:430)
==2402562== by 0x4C787B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647)
==2402562== by 0x498A328: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==2402562== by 0x1B98A3: iwm_slip::setup_spi() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1BAF51: iwmBus::setup() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x131F34: main_setup(int, char**) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x130DA0: main (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562==
==2402562== 2,304 bytes in 1 blocks are possibly lost in loss record 77 of 83
==2402562== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2402562== by 0x4005D97: malloc (rtld-malloc.h:56)
==2402562== by 0x4005D97: _dlfo_mappings_segment_allocate (dl-find_object.c:217)
==2402562== by 0x4005D97: _dl_find_object_update_1 (dl-find_object.c:671)
==2402562== by 0x4005D97: _dl_find_object_update (dl-find_object.c:804)
==2402562== by 0x400ECCF: dl_open_worker_begin (dl-open.c:735)
==2402562== by 0x4D57A97: _dl_catch_exception (dl-error-skeleton.c:208)
==2402562== by 0x400DF99: dl_open_worker (dl-open.c:782)
==2402562== by 0x4D57A97: _dl_catch_exception (dl-error-skeleton.c:208)
==2402562== by 0x400E34D: _dl_open (dl-open.c:883)
==2402562== by 0x4D57E00: do_dlopen (dl-libc.c:95)
==2402562== by 0x4D57A97: _dl_catch_exception (dl-error-skeleton.c:208)
==2402562== by 0x4D57B62: _dl_catch_error (dl-error-skeleton.c:227)
==2402562== by 0x4D57F36: dlerror_run (dl-libc.c:45)
==2402562== by 0x4D57F36: __libc_dlopen_mode (dl-libc.c:162)
==2402562== by 0x4D380C9: module_load (nss_module.c:191)
==2402562==
==2402562== 3,128 bytes in 23 blocks are definitely lost in loss record 78 of 83
==2402562== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2402562== by 0x192508: mgHttpClient::begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1B3C1C: NetworkProtocolHTTP::mount(PeoplesUrlParser*) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1AE58B: NetworkProtocolFS::open(PeoplesUrlParser*, cmdFrame_t*) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1ED92B: iwmNetwork::open() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EC0B4: iwmNetwork::iwm_ctrl(iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EA920: iwmNetwork::process(iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1BB81A: iwmBus::service() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1319B7: fn_service_loop(void*) [clone .part.0] (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x130DB1: main (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562==
==2402562== 4,080 bytes in 23 blocks are definitely lost in loss record 79 of 83
==2402562== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2402562== by 0x141C44: util_hexdump(void const*, unsigned long) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EB7E4: iwmNetwork::read_channel_json(unsigned short, iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EBAB4: iwmNetwork::iwm_read(iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EA9D0: iwmNetwork::process(iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1BB81A: iwmBus::service() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1319B7: fn_service_loop(void*) [clone .part.0] (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x130DB1: main (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562==
==2402562== 14,472 (9,152 direct, 5,320 indirect) bytes in 22 blocks are definitely lost in loss record 81 of 83
==2402562== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2402562== by 0x14ED3F: PeoplesUrlParser::parseURL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EC6FF: iwmNetwork::create_url_parser() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1ED599: iwmNetwork::parse_and_instantiate_protocol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1ED8F6: iwmNetwork::open() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EC0B4: iwmNetwork::iwm_ctrl(iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EA920: iwmNetwork::process(iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1BB81A: iwmBus::service() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1319B7: fn_service_loop(void*) [clone .part.0] (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x130DB1: main (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562==
==2402562== 4,797,064 bytes in 23 blocks are definitely lost in loss record 83 of 83
==2402562== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2402562== by 0x4C8B58E: strdup (strdup.c:42)
==2402562== by 0x195355: mgHttpClient::load_system_certs_unix() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x195653: mgHttpClient::mgHttpClient() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1B3BDB: NetworkProtocolHTTP::mount(PeoplesUrlParser*) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1AE58B: NetworkProtocolFS::open(PeoplesUrlParser*, cmdFrame_t*) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1ED92B: iwmNetwork::open() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EC0B4: iwmNetwork::iwm_ctrl(iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1EA920: iwmNetwork::process(iwm_decoded_cmd_t) (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1BB81A: iwmBus::service() (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x1319B7: fn_service_loop(void*) [clone .part.0] (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562== by 0x130DB1: main (in /home/thomc/Workspace/fujinet-pc-apple2/build/dist/fujinet)
==2402562==
==2402562== LEAK SUMMARY:
==2402562== definitely lost: 4,813,424 bytes in 91 blocks
==2402562== indirectly lost: 5,320 bytes in 126 blocks
==2402562== possibly lost: 2,912 bytes in 3 blocks
==2402562== still reachable: 94,891 bytes in 138 blocks
==2402562== suppressed: 0 bytes in 0 blocks
==2402562== Reachable blocks (those to which a pointer was found) are not shown.
==2402562== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==2402562==
==2402562== Use --track-origins=yes to see where uninitialised values come from
==2402562== For lists of detected and suppressed errors, rerun with: -s
==2402562== ERROR SUMMARY: 29781 errors from 17 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment