-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[metadata] Fix leaks when handling a few attributes #16675
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
Conversation
Callers of mono_reflection_create_custom_attr_data_args_noalloc were leaking some of the returned information. Accessed attributes are FixedBufferAttribute and UnmanagedFunctionPointerAttribute.
|
Where is the allocation actually happening? Apologies, but I'm very familiar with this part of the codebase and the logic around |
|
@CoffeeFlux the freed values are allocated in load_cattr_value. There are some malloc's there for primitive types |
CoffeeFlux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see. LGTM.
|
hi, Would it be possible to backport this to https://github.com/mono/mono/commits/2019-02 |
|
@monojenkins backport 2019-08 |
|
@BrzVlad backporting to 2019-06 failed, the patch results in conflicts: Please backport manually! |
Callers of mono_reflection_create_custom_attr_data_args_noalloc were leaking some of the returned information. Accessed attributes are FixedBufferAttribute and UnmanagedFunctionPointerAttribute.
|
@MattL0 Forgot to answer, sorry. 2019-02 is already done. This fix will be in the following release / preview. |
|
Thanks ! |
Callers of mono_reflection_create_custom_attr_data_args_noalloc were leaking some of the returned information. Accessed attributes are FixedBufferAttribute and UnmanagedFunctionPointerAttribute. Commit migrated from mono/mono@e49be5b
Callers of mono_reflection_create_custom_attr_data_args_noalloc were leaking some of the returned information. Accessed attributes are FixedBufferAttribute and UnmanagedFunctionPointerAttribute.