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

Decoded custom attribute values leak the encoded value receiver #14543

Closed
Therzok opened this issue May 20, 2019 · 1 comment · Fixed by #14544 or xamarin/xamarin-android#3122

Comments

@Therzok
Copy link
Member

@Therzok Therzok commented May 20, 2019

Steps to Reproduce

  1. See attached source and leaks report: https://gist.github.com/Therzok/d2e8322a9f1cd4608981dbd43ccfd83b
  2. run MallocStackLogging=YES mono --debug a.exe
  3. leaks mono

Current Behavior

Unbounded leak of CustomAttribute field/property initializer name. Leaks were of type: FieldName, PropName, FieldType. Haven't seen PropType.

Expected Behavior

No leak of attribute receiver name.

On which platforms did you notice this

[*] macOS
[ ] Linux
[ ] Windows

Version Used:
Mono JIT compiler version 5.18.1.26 (pull-request-14392/d76505c27ee Wed May 8 08:28:00 EDT 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS:
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(600)
Suspend: preemptive
GC: sgen (concurrent by default)## Stacktrace

Please paste the stack trace here if available.
@Therzok

This comment has been minimized.

Copy link
Member Author

@Therzok Therzok commented May 20, 2019

I figured this one out, I'll propose a PR. Only the last attribute is freed.

Therzok added a commit to Therzok/mono that referenced this issue May 21, 2019
All the CustomAttribute initializer names (fields, property) except the last were leaked. Ensure all names are freed.

Fixes mono#14543
vargaz added a commit that referenced this issue May 23, 2019
* Plug leak of CustomAttribute initializer name

All the CustomAttribute initializer names (fields, property) except the last were leaked. Ensure all names are freed.

Fixes #14543

* Apply suggestions from code review

Co-Authored-By: Martin Baulig <mabaul@microsoft.com>
monojenkins added a commit to monojenkins/mono that referenced this issue May 23, 2019
All the CustomAttribute initializer names (fields, property) except the last were leaked. Ensure all names are freed.

Fixes mono#14543
monojenkins added a commit to monojenkins/mono that referenced this issue May 23, 2019
All the CustomAttribute initializer names (fields, property) except the last were leaked. Ensure all names are freed.

Fixes mono#14543
marek-safar added a commit that referenced this issue May 23, 2019
All the CustomAttribute initializer names (fields, property) except the last were leaked. Ensure all names are freed.

Fixes #14543
jonpryor added a commit to jonpryor/xamarin-android that referenced this issue May 24, 2019
pull bot pushed a commit to Pandinosaurus/xamarin-android that referenced this issue May 24, 2019
jonpryor added a commit to xamarin/xamarin-android that referenced this issue May 24, 2019
marek-safar added a commit that referenced this issue May 31, 2019
All the CustomAttribute initializer names (fields, property) except the last were leaked. Ensure all names are freed.

Fixes #14543
@marek-safar marek-safar added this to the 2019-02 (6.0.xx) milestone Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.