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

memory leaks in Context::openStream #76

Open
ZZZZZZGary opened this issue Sep 19, 2024 · 0 comments
Open

memory leaks in Context::openStream #76

ZZZZZZGary opened this issue Sep 19, 2024 · 0 comments

Comments

@ZZZZZZGary
Copy link

When I use the leaks tool in MacOS, it reports a leak.

#-> leaks 93838
Process 93838 is not debuggable. Due to security restrictions, leaks can only show or save contents of readonly memory of restricted processes.

Process:         **** [93838]
Path:            ****
Load Address:    0x102044000
Identifier:      ****
Version:         1.0 (1)
Code Type:       ARM64
Platform:        macOS
Parent Process:  zsh [27483]

Date/Time:       2024-09-19 17:08:26.659 +0800
Launch Time:     2024-09-19 17:08:03.996 +0800
OS Version:      macOS 14.6.1 (23G93)
Report Version:  7
Analysis Tool:   /Applications/Xcode.app/Contents/Developer/usr/bin/leaks
Analysis Tool Version:  Xcode 15.4 (15F31d)

Physical footprint:         217.1M
Physical footprint (peak):  229.5M
Idle exit:                  untracked
----

leaks Report Version: 4.0, multi-line stacks
Process 93838: 290323 nodes malloced for 112436 KB
Process 93838: 32 leaks for 2496 total leaked bytes.

STACK OF 10 INSTANCES OF 'ROOT LEAK: <IOUSBDeviceClass>':
15  dyld                                  0x180907154 start + 2476
14  ****                        0x10209482c main + 148  main.cpp:47
13  ****                        0x10208ac50 ****
12  ****                        0x1021f617c ****
11  ****                        0x1021f4af4 ****
10  ****                        0x1021f513c ****
9   ****                        0x1021f1158 ****
8   ****                        0x102249df4 Context::openStream(unsigned int, unsigned int) + 136
7   ****                        0x10224c83c PlatformStream::open(Context*, deviceInfo*, unsigned int, unsigned int, unsigned int, unsigned int) + 1504
6   ****                        0x10224cca8 UVCCtrl::findDevice(unsigned short, unsigned short, unsigned int) + 328
5   com.apple.framework.IOKit             0x184457564 IOCreatePlugInInterfaceForService + 676
4   com.apple.CoreFoundation              0x180de3508 CFPlugInInstanceCreate + 300
3   com.apple.CoreFoundation              0x180de3764 __CFPLUGIN_IS_CALLING_OUT_TO_A_FACTORY_FUNCTION__ + 28
2   com.apple.iokit.IOUSBLib              0x1031df894 IOUSBDeviceClass::alloc() + 24
1   libc++abi.dylib                       0x180c4abd4 operator new(unsigned long) + 32
0   libsystem_malloc.dylib                0x180acba68 _malloc_zone_malloc_instrumented_or_legacy + 148 
====
    32 (2.44K) << TOTAL >>

      5 (496 bytes) ROOT LEAK: <IOUSBDeviceClass 0x11f7e0170> [144]
         4 (352 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x11f7dec80> [32]
            1 (128 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x11f7e04e0> [128]
            1 (112 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x11f7e0560> [112]
            1 (80 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x11f7e0490> [80]

      3 (256 bytes) ROOT LEAK: <IOUSBDeviceClass 0x116007640> [144]
         2 (112 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x1208ae580> [16]
            1 (96 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x1208af320> [96]

      3 (256 bytes) ROOT LEAK: <IOUSBDeviceClass 0x11f7e0200> [144]
         2 (112 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x1208ae240> [16]
            1 (96 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x1208af1e0> [96]

      3 (240 bytes) ROOT LEAK: <IOUSBDeviceClass 0x1208ad150> [144]
         2 (96 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x11602d320> [16]
            1 (80 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x11602e610> [80]

      3 (224 bytes) ROOT LEAK: <IOUSBDeviceClass 0x11f7dfde0> [144]
         2 (80 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x1208ae980> [16]
            1 (64 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x1208aeec0> [64]

      3 (208 bytes) ROOT LEAK: <IOUSBDeviceClass 0x116007a50> [144]
         2 (64 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x1208ae970> [16]
            1 (48 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x1208af450> [48]

      3 (208 bytes) ROOT LEAK: <IOUSBDeviceClass 0x11f7dfd10> [144]
         2 (64 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x11f7dfb70> [16]
            1 (48 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x11f7e0140> [48]

      3 (208 bytes) ROOT LEAK: <IOUSBDeviceClass 0x1208ad0c0> [144]
         2 (64 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x11f7df360> [16]
            1 (48 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x11f7e06e0> [48]

      3 (208 bytes) ROOT LEAK: <IOUSBDeviceClass 0x1208ade90> [144]
         2 (64 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x11f7df290> [16]
            1 (48 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x11f7e02c0> [48]

      3 (192 bytes) ROOT LEAK: <IOUSBDeviceClass 0x1208aec90> [144]
         2 (48 bytes) <malloc in IOUSBDeviceClass::start(__CFDictionary const*, unsigned int) 0x1208ae590> [16]
            1 (32 bytes) <malloc in IOUSBDeviceClass::CacheConfigDescriptor() 0x12088f270> [32]
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

1 participant