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

Missing cpuinfo_deinitialize implementation #150

Open
jrosdahl opened this issue May 26, 2023 · 0 comments · May be fixed by #208
Open

Missing cpuinfo_deinitialize implementation #150

jrosdahl opened this issue May 26, 2023 · 0 comments · May be fixed by #208

Comments

@jrosdahl
Copy link

When using ONNX Runtime (which has PyTorch cpuinfo as a static dependency) with a Linux program built with LeakSanitizer/AddressSanitizer, memory leaks are reported:

=================================================================
==11753==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 576 byte(s) in 1 object(s) allocated from:
    #0 0x2b11dd429917 in __interceptor_calloc (/path/to/libasan.so.6+0xb4917)
    #1 0x2b11e45064b6 in cpuinfo_x86_linux_init (/path/to/libonnxruntime.so.1.14.1+0x8684b6)

Direct leak of 576 byte(s) in 1 object(s) allocated from:
    #0 0x2b11dd429917 in __interceptor_calloc (/path/to/libasan.so.6+0xb4917)
    #1 0x2b11e4506496 in cpuinfo_x86_linux_init (/path/to/libonnxruntime.so.1.14.1+0x868496)

SUMMARY: AddressSanitizer: 1152 byte(s) leaked in 2 allocation(s).

ONNX Runtime doesn't call cpuinfo_deinitialize, but on the other hand that wouldn't help since the implementation is empty.

It would be nice if cpuinfo_deinitialize could be implemented so that ONNX Runtime and other users can call it to deallocate the resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants