-
Notifications
You must be signed in to change notification settings - Fork 519
Scripting memory capture - static field byte reporting fix #1065
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
Scripting memory capture - static field byte reporting fix #1065
Conversation
…atic fields being reported as present. * changed class crawling to be recursive and now store non inited classes * metadata type reporting will now also report invalid uninitialized types * metadata type reporting will now account for array types being fields inside a class
Just a heads up, the new clang formatting got picked up so I let it do it's thing ^_^ |
mono/metadata/unity-memory-info.c
Outdated
if (!g_hash_table_lookup_extended (context->allTypes, klass, &orig_key, &value)) | ||
g_hash_table_insert (context->allTypes, klass, GINT_TO_POINTER (context->currentIndex++)); | ||
|
||
fieldCount = mono_class_num_fields (klass); |
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.
Do we always want to do this, or only if the insert succeeds?
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 ops only if it succeeds fixing up, also making sure we don't do the extra lookup there, fixed in cs
90bf666
…ash table. changed code so we avoid an extra lookup
*added missing include which caused the function signature to be int thus downcasting the pointer from 64 bit to 32
*added missing include which caused the function signature to be int thus downcasting the pointer from 64 bit to 32
fix for case 984330, static field bytes being reported without any static fields being reported as present when the static field would be one an array type or generic type instance.