Open ikbenkous opened 9 months ago
Klog has some memory issues. There's a double free() somewhere and valgrind has a field day listing off issues. Traditional unsafe C-style pointers are used throughout the codebase, even in places to denote ownership (like class members).
free()
The Core CPP Guidelines have some input regarding this: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-resource Specifically R20 through R30 seem good advice.
Since Klog is compiled with c++11 (which has smart pointers), I think unsafe pointers can slowly be replaced where it makes sense to do so! DO NOTE: R.30 and F.7 regarding function arguments: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-weak_ptr https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-smart
This seems like an enhancement that could go well with the header guard improvements to improve the codebase quality!
I suggest that this issue is assigned to milestone Klog-2.4. Since #624 is assigned there as well.
See #643
Klog has some memory issues. There's a double
free()
somewhere and valgrind has a field day listing off issues. Traditional unsafe C-style pointers are used throughout the codebase, even in places to denote ownership (like class members).The Core CPP Guidelines have some input regarding this: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-resource Specifically R20 through R30 seem good advice.
Since Klog is compiled with c++11 (which has smart pointers), I think unsafe pointers can slowly be replaced where it makes sense to do so! DO NOTE: R.30 and F.7 regarding function arguments: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-weak_ptr https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-smart
This seems like an enhancement that could go well with the header guard improvements to improve the codebase quality!