I am using pcsc-lite with embedded project, I have USB card reader, I can see pcscd keeps growing when it is running, I ran with valgrind, it points memory leak in libusb, any idea how can I fix this?.
# ps - eaf | grep pcscd 7070 root 87328 S valgrind /pfrm2.0/bin/pcscd # ps - eaf | grep pcscd 7070 root 221504 S valgrind /pfrm2.0/bin/pcscd # ps - eaf | grep pcscd 7070 root 229792 S valgrind /pfrm2.0/bin/pcscd # # ps - eaf | grep pcscd 7070 root 296112 S valgrind /pfrm2.0/bin/pcscd # # ps - eaf | grep pcscd 7070 root 363440 S valgrind /pfrm2.0/bin/pcscd # # ps - eaf | grep pcscd 7070 root 396592 S valgrind /pfrm2.0/bin/pcscd # ps - eaf | grep pcscd 7070 root 488800 S valgrind /pfrm2.0/bin/pcscd # ps - eaf | grep pcscd 7070 root 497088 S valgrind /pfrm2.0/bin/pcscd # ==7070== 12 bytes in 1 blocks are definitely lost in loss record 2 of 32 ==7070== at 0x40218E4: malloc (vg_replace_malloc.c:195) ==7070== by 0x4D9B6B6: ??? ==7070== by 0x4D9BB1A: ??? ==7070== by 0x4D95548: ??? ==7070== by 0x804DD45: IFDControl (ifdwrapper.c:624) ==7070== by 0x8053D51: SCardControl (winscard.c:1436) ==7070== by 0x8056F8C: ContextThread (winscard_svc.c:455) ==7070== by 0x4033282: start_thread (in /lib/libpthread-2.5.so) ==7070== by 0x4101C6D: clone (in /lib/libc-2.5.so) ==7070== ==7070== 16 bytes in 1 blocks are possibly lost in loss record 3 of 32 ==7070== at 0x40218E4: malloc (vg_replace_malloc.c:195) ==7070== by 0x41723B2: usbi_add_pollfd (io.c:2179) ==7070== by 0x41734FF: usbi_io_init (io.c:1015) ==7070== by 0x4170F74: libusb_init (core.c:1484) ==7070== by 0x4028C8E: usb_init (core.c:145) ==7070== by 0x804D6BC: HPEstablishUSBNotifications (hotplug_libusb.c:390) ==7070== by 0x4033282: start_thread (in /lib/libpthread-2.5.so) ==7070== by 0x4101C6D: clone (in /lib/libc-2.5.so) ==7070== ==7070== 54 bytes in 3 blocks are possibly lost in loss record 13 of 32 ==7070== at 0x40218E4: malloc (vg_replace_malloc.c:195) ==7070== by 0x417630B: enumerate_device (linux_usbfs.c:733) ==7070== by 0x4176927: op_get_device_list (linux_usbfs.c:854) ==7070== by 0x41706AA: libusb_get_device_list (core.c:605) ==7070== by 0x4028362: usb_find_devices (core.c:579) ==7070== by 0x804D175: HPRescanUsbBus (hotplug_libusb.c:255) ==7070== by 0x804D6C1: HPEstablishUSBNotifications (hotplug_libusb.c:393) ==7070== by 0x4033282: start_thread (in /lib/libpthread-2.5.so) ==7070== by 0x4101C6D: clone (in /lib/libc-2.5.so) ==7070== ==7070== 136 bytes in 1 blocks are possibly lost in loss record 17 of 32 ==7070== at 0x4020CC1: calloc (vg_replace_malloc.c:418) ==7070== by 0x40102C8: allocate_dtv (in /lib/ld-2.5.so) ==7070== by 0x401038B: _dl_allocate_tls (in /lib/ld-2.5.so) ==7070== by 0x4033A7F: pthread_create@@GLIBC_2.1 (in /lib/libpthread-2.5.so) ==7070== by 0x8051E41: SYS_ThreadCreate (thread_unix.c:81) ==7070== by 0x8055F8C: CreateContextThread (winscard_svc.c:100) ==7070== by 0x804F00A: main (pcscdaemon.c:148) ==7070== ==7070== 143 bytes in 3 blocks are possibly lost in loss record 18 of 32 ==7070== at 0x40218E4: malloc (vg_replace_malloc.c:195) ==7070== by 0x4175649: cache_active_config (linux_usbfs.c:610) ==7070== by 0x4176366: enumerate_device (linux_usbfs.c:758) ==7070== by 0x4176927: op_get_device_list (linux_usbfs.c:854) ==7070== by 0x41706AA: libusb_get_device_list (core.c:605) ==7070== by 0x4028362: usb_find_devices (core.c:579) ==7070== by 0x804D175: HPRescanUsbBus (hotplug_libusb.c:255) ==7070== by 0x804D6C1: HPEstablishUSBNotifications (hotplug_libusb.c:393) ==7070== by 0x4033282: start_thread (in /lib/libpthread-2.5.so) ==7070== by 0x4101C6D: clone (in /lib/libc-2.5.so) ==7070== ==7070== 3,944 bytes in 29 blocks are possibly lost in loss record 28 of 32 ==7070== at 0x4020CC1: calloc (vg_replace_malloc.c:418) ==7070== by 0x40102C8: allocate_dtv (in /lib/ld-2.5.so) ==7070== by 0x401038B: _dl_allocate_tls (in /lib/ld-2.5.so) ==7070== by 0x4033A7F: pthread_create@@GLIBC_2.1 (in /lib/libpthread-2.5.so) ==7070== by 0x4D9B6EC: ??? ==7070== by 0x4D9BB1A: ??? ==7070== by 0x4D95548: ??? ==7070== by 0x804DD45: IFDControl (ifdwrapper.c:624) ==7070== by 0x8053D51: SCardControl (winscard.c:1436) ==7070== by 0x8056F8C: ContextThread (winscard_svc.c:455) ==7070== by 0x4033282: start_thread (in /lib/libpthread-2.5.so) ==7070== by 0x4101C6D: clone (in /lib/libc-2.5.so) ==7070== ==7070== LEAK SUMMARY: ==7070== definitely lost: 12 bytes in 1 blocks ==7070== indirectly lost: 0 bytes in 0 blocks ==7070== possibly lost: 4,293 bytes in 37 blocks ==7070== still reachable: 53,046 bytes in 133 blocks ==7070== suppressed: 0 bytes in 0 blocks ==7070== Reachable blocks (those to which a pointer was found) are not shown. ==7070== To see them, rerun with: --leak-check=full --show-reachable=yes ==7070== ==7070== For counts of detected and suppressed errors, rerun with: -v ==7070== ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 9 from 9)
_______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
