Skip to content

Instantly share code, notes, and snippets.

@mfiumara
Created October 15, 2019 19:19
Show Gist options
  • Save mfiumara/ced58c214b4aa84917fb8f836ce05dd8 to your computer and use it in GitHub Desktop.
Save mfiumara/ced58c214b4aa84917fb8f836ce05dd8 to your computer and use it in GitHub Desktop.
==30037== Memcheck, a memory error detector
==30037== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==30037== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==30037== Command: ./build/zephyr/zephyr.exe --bt-dev=hci0
==30037==
WARNING: Using a test - not safe - entropy source
[00:00:00.000,000] <inf> flash_native_posix: Device flash_ctrl initialized
***** Booting Zephyr OS build zephyr-v2.0.0-1-gca3eb0eb31d1 *****
Initializing...
[00:00:00.870,000] <inf> bt_hci_core: Identity: 60:57:18:3e:41:61 (public)
[00:00:00.870,000] <inf> bt_hci_core: HCI: version 4.2 (0x08) revision 0x1000, manufacturer 0x0002
[00:00:00.870,000] <inf> bt_hci_core: LMP: version 4.2 (0x08) subver 0x1000
Bluetooth initialized
[00:00:00.870,000] <dbg> bt_mesh_settings.mesh_commit: sub[0].net_idx 0xffff
[00:00:00.870,000] <inf> bt_mesh_main: Device UUID: 00000000-0000-0000-0000-00000000dddd
Mesh initialized
*** stack smashing detected ***: <unknown> terminated
==30037==
==30037== Process terminating with default action of signal 6 (SIGABRT): dumping core
==30037== at 0x49ABB06: raise (in /usr/lib32/libc-2.30.so)
==30037== by 0x49943F4: abort (in /usr/lib32/libc-2.30.so)
==30037== by 0x49EFF3B: __libc_message (in /usr/lib32/libc-2.30.so)
==30037== by 0x4A8B26D: __fortify_fail_abort (in /usr/lib32/libc-2.30.so)
==30037== by 0x4A8B21E: __stack_chk_fail (in /usr/lib32/libc-2.30.so)
==30037== by 0x135CB5: prov_random (prov.c:1010)
==30037== by 0x1360F3: bt_mesh_pb_gatt_recv (prov.c:1504)
==30037== by 0x136A3E: proxy_complete_pdu (proxy.c:439)
==30037== by 0x136EA7: proxy_recv (proxy.c:529)
==30037== by 0x121573: write_cb (att.c:1273)
==30037== by 0x123AA0: gatt_foreach_iter (gatt.c:1083)
==30037== by 0x123AA0: gatt_foreach_iter (gatt.c:1053)
==30037== by 0x123AA0: bt_gatt_foreach_attr_type (gatt.c:1147)
==30037== by 0x120CD1: bt_gatt_foreach_attr (gatt.h:375)
==30037==
==30037== HEAP SUMMARY:
==30037== in use at exit: 2,792 bytes in 9 blocks
==30037== total heap usage: 15 allocs, 6 frees, 4,836 bytes allocated
==30037==
==30037== 136 bytes in 1 blocks are possibly lost in loss record 1 of 9
==30037== at 0x4838A16: calloc (vg_replace_malloc.c:762)
==30037== by 0x4012466: allocate_dtv (in /usr/lib32/ld-2.30.so)
==30037== by 0x4012E43: _dl_allocate_tls (in /usr/lib32/ld-2.30.so)
==30037== by 0x495D30C: pthread_create@@GLIBC_2.1 (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x11A59F: posix_boot_cpu (soc.c:210)
==30037== by 0x11B3F2: main (main.c:67)
==30037==
==30037== 136 bytes in 1 blocks are possibly lost in loss record 2 of 9
==30037== at 0x4838A16: calloc (vg_replace_malloc.c:762)
==30037== by 0x4012466: allocate_dtv (in /usr/lib32/ld-2.30.so)
==30037== by 0x4012E43: _dl_allocate_tls (in /usr/lib32/ld-2.30.so)
==30037== by 0x495D30C: pthread_create@@GLIBC_2.1 (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x11A19A: posix_new_thread (posix_core.c:380)
==30037== by 0x1394CD: z_setup_new_thread (thread.c:424)
==30037== by 0x1382D5: prepare_multithreading (init.c:381)
==30037== by 0x1382D5: z_cstart (init.c:526)
==30037== by 0x11A517: zephyr_wrapper (soc.c:189)
==30037== by 0x495C659: start_thread (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x4A7B919: clone (in /usr/lib32/libc-2.30.so)
==30037==
==30037== 136 bytes in 1 blocks are possibly lost in loss record 3 of 9
==30037== at 0x4838A16: calloc (vg_replace_malloc.c:762)
==30037== by 0x4012466: allocate_dtv (in /usr/lib32/ld-2.30.so)
==30037== by 0x4012E43: _dl_allocate_tls (in /usr/lib32/ld-2.30.so)
==30037== by 0x495D30C: pthread_create@@GLIBC_2.1 (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x11A19A: posix_new_thread (posix_core.c:380)
==30037== by 0x1394CD: z_setup_new_thread (thread.c:424)
==30037== by 0x13832F: init_idle_thread (init.c:321)
==30037== by 0x13832F: prepare_multithreading (init.c:390)
==30037== by 0x13832F: z_cstart (init.c:526)
==30037== by 0x11A517: zephyr_wrapper (soc.c:189)
==30037== by 0x495C659: start_thread (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x4A7B919: clone (in /usr/lib32/libc-2.30.so)
==30037==
==30037== 136 bytes in 1 blocks are possibly lost in loss record 4 of 9
==30037== at 0x4838A16: calloc (vg_replace_malloc.c:762)
==30037== by 0x4012466: allocate_dtv (in /usr/lib32/ld-2.30.so)
==30037== by 0x4012E43: _dl_allocate_tls (in /usr/lib32/ld-2.30.so)
==30037== by 0x495D30C: pthread_create@@GLIBC_2.1 (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x11A19A: posix_new_thread (posix_core.c:380)
==30037== by 0x1394CD: z_setup_new_thread (thread.c:424)
==30037== by 0x139511: z_impl_k_thread_create (thread.c:502)
==30037== by 0x139781: k_thread_create (kernel.h:19)
==30037== by 0x139781: k_work_q_start (work_q.c:32)
==30037== by 0x139413: k_sys_work_q_init (system_work_q.c:25)
==30037== by 0x1380DA: z_sys_device_do_config_level (device.c:56)
==30037== by 0x138226: bg_thread_main (init.c:258)
==30037== by 0x114224: z_thread_entry (thread_entry.c:29)
==30037==
==30037== 136 bytes in 1 blocks are possibly lost in loss record 5 of 9
==30037== at 0x4838A16: calloc (vg_replace_malloc.c:762)
==30037== by 0x4012466: allocate_dtv (in /usr/lib32/ld-2.30.so)
==30037== by 0x4012E43: _dl_allocate_tls (in /usr/lib32/ld-2.30.so)
==30037== by 0x495D30C: pthread_create@@GLIBC_2.1 (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x11A19A: posix_new_thread (posix_core.c:380)
==30037== by 0x1394CD: z_setup_new_thread (thread.c:424)
==30037== by 0x139511: z_impl_k_thread_create (thread.c:502)
==30037== by 0x11EAE8: k_thread_create (kernel.h:19)
==30037== by 0x11EAE8: bt_enable (hci_core.c:5122)
==30037== by 0x113CB8: zephyr_app_main (main.c:207)
==30037== by 0x13824B: bg_thread_main (init.c:295)
==30037== by 0x114224: z_thread_entry (thread_entry.c:29)
==30037== by 0x11A06A: posix_thread_starter (posix_core.c:305)
==30037==
==30037== 136 bytes in 1 blocks are possibly lost in loss record 6 of 9
==30037== at 0x4838A16: calloc (vg_replace_malloc.c:762)
==30037== by 0x4012466: allocate_dtv (in /usr/lib32/ld-2.30.so)
==30037== by 0x4012E43: _dl_allocate_tls (in /usr/lib32/ld-2.30.so)
==30037== by 0x495D30C: pthread_create@@GLIBC_2.1 (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x11A19A: posix_new_thread (posix_core.c:380)
==30037== by 0x1394CD: z_setup_new_thread (thread.c:424)
==30037== by 0x139511: z_impl_k_thread_create (thread.c:502)
==30037== by 0x11C23C: k_thread_create (kernel.h:19)
==30037== by 0x11C23C: bt_hci_ecc_init (hci_ecc.c:322)
==30037== by 0x11EB02: bt_enable (hci_core.c:5131)
==30037== by 0x113CB8: zephyr_app_main (main.c:207)
==30037== by 0x13824B: bg_thread_main (init.c:295)
==30037== by 0x114224: z_thread_entry (thread_entry.c:29)
==30037==
==30037== 136 bytes in 1 blocks are possibly lost in loss record 7 of 9
==30037== at 0x4838A16: calloc (vg_replace_malloc.c:762)
==30037== by 0x4012466: allocate_dtv (in /usr/lib32/ld-2.30.so)
==30037== by 0x4012E43: _dl_allocate_tls (in /usr/lib32/ld-2.30.so)
==30037== by 0x495D30C: pthread_create@@GLIBC_2.1 (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x11A19A: posix_new_thread (posix_core.c:380)
==30037== by 0x1394CD: z_setup_new_thread (thread.c:424)
==30037== by 0x139511: z_impl_k_thread_create (thread.c:502)
==30037== by 0x119D14: k_thread_create (kernel.h:19)
==30037== by 0x119D14: uc_open (userchan.c:193)
==30037== by 0x11EB0A: bt_enable (hci_core.c:5134)
==30037== by 0x113CB8: zephyr_app_main (main.c:207)
==30037== by 0x13824B: bg_thread_main (init.c:295)
==30037== by 0x114224: z_thread_entry (thread_entry.c:29)
==30037==
==30037== 560 bytes in 1 blocks are still reachable in loss record 8 of 9
==30037== at 0x483656B: malloc (vg_replace_malloc.c:308)
==30037== by 0x4838CB8: realloc (vg_replace_malloc.c:836)
==30037== by 0x11BC38: native_add_command_line_opts (cmdline.c:57)
==30037== by 0x11A996: native_add_time_options (timer_model.c:542)
==30037== by 0x11A62E: run_native_tasks (soc.c:251)
==30037== by 0x11B3C3: main (main.c:57)
==30037==
==30037== 1,280 bytes in 1 blocks are still reachable in loss record 9 of 9
==30037== at 0x4838A16: calloc (vg_replace_malloc.c:762)
==30037== by 0x11A1D1: posix_init_multithreading (posix_core.c:403)
==30037== by 0x11A512: zephyr_wrapper (soc.c:186)
==30037== by 0x495C659: start_thread (in /usr/lib32/libpthread-2.30.so)
==30037== by 0x4A7B919: clone (in /usr/lib32/libc-2.30.so)
==30037==
==30037== LEAK SUMMARY:
==30037== definitely lost: 0 bytes in 0 blocks
==30037== indirectly lost: 0 bytes in 0 blocks
==30037== possibly lost: 952 bytes in 7 blocks
==30037== still reachable: 1,840 bytes in 2 blocks
==30037== suppressed: 0 bytes in 0 blocks
==30037==
==30037== For lists of detected and suppressed errors, rerun with: -s
==30037== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
[1] 30036 abort sudo valgrind --leak-check=full --show-leak-kinds=all --bt-dev=hci0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment