https://bugs.llvm.org/show_bug.cgi?id=44387
Bug ID: 44387
Summary: memory leak in locale.cpp
Product: libc++
Version: unspecified
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Standards Issues
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
I am locating a memory leak problem about Android NDK shared library. When I
dlopen libc++_shared.so(which is the same with libc++.so) and dlclose it, there
will be an 8 bytes memory leak. And when I dlopen and dlclose it again, there
will be another 8 bytes memory leak.
And I find the leak is in the locale.cpp file.
In locale.cpp:
locale_t __cloc() {
// In theory this could create a race condition. In practice
// the race condition is non-fatal since it will just create
// a little resource leak. Better approach would be appreciated.
static locale_t result = newlocale(LC_ALL_MASK, "C", 0);
return result;
}
The variable 'result' will be allocated a locale object and never free.
Is it a memory leak bug?
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs