-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix RaithData memory leaks #271
Conversation
@heitzmann do you know what has causes this error? I am developing on Ubuntu 24.04 so was unaware of such an issue with macos and windows |
From
Or, very specifically, the
I suspect the Windows failure is similar. |
@MatthewMckee4 That's correct, we have to switch to C++ 17 to use optional. From your changes, I believe the leak comes from the |
in RaithData::copy_from the code is as follows ...
if (base_cell_name) free_allocation(base_cell_name);
base_cell_name = NULL;
if (raith_data.base_cell_name) base_cell_name = copy_string(raith_data.base_cell_name, NULL); I think it should just be ...
base_cell_name = NULL;
if (raith_data.base_cell_name) base_cell_name = copy_string(raith_data.base_cell_name, NULL); When the free_allocation call is there there's a memory leak: free(): invalid pointer
Aborted (core dumped) |
The problem is not the free call. It's wherever the flexpath was created
without clearing this member. I found one instance in the python interface
and already patched it in 0.9.55. You have to trace back where this
variable was set with dirty memory
…On Sun, Sep 1, 2024, 17:32 Matthew Mckee ***@***.***> wrote:
in RaithData::copy_from the code is as follows
...
if (base_cell_name) free_allocation(base_cell_name);
base_cell_name = NULL;
if (raith_data.base_cell_name) base_cell_name = copy_string(raith_data.base_cell_name, NULL);
I think it should just be
...
base_cell_name = NULL;
if (raith_data.base_cell_name) base_cell_name = copy_string(raith_data.base_cell_name, NULL);
When the free_allocation call is there there's a memory leak:
free(): invalid pointer
Aborted (core dumped)
—
Reply to this email directly, view it on GitHub
<#271 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNJ2E4QNBN7AW7FA3V4SVDZUN2VPAVCNFSM6AAAAABM6TUO3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGQ4DQMJXG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sorry for not getting back to you sooner, i believe this is fixed so will close this issues |
Fix for #270.
Changes:
optional<RaithData>
RaithData
structRaithData
FlexPath.rath_data