-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[mono] Avoid an assert if the class name table is too large. #85952
Conversation
cc @radical |
7786b0c
to
d289d08
Compare
@@ -11646,11 +11646,15 @@ emit_class_name_table (MonoAotCompile *acfg) | |||
name_p = name_buf = (guint8 *)g_malloc0 (name_buf_size); | |||
#endif | |||
|
|||
guint table_len = table->len; | |||
if (table_size > 65000 || table->len > 65000) { |
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.
Why 65000? (As opposed to 65534 or something)
Do we know how much over the limit the microsoft graph API is? I guess metadata tokens are effectively 24 bits right? so there could be as many as 2^24-1 classes in that assembly?
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.
I mean it's kind of too bad that the largest assembly is the one that gets penalized by not having fast name lookup
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.
65000 is used to avoid having to think about off by one errors. The assembly has about 40k classes, maybe linking is turned off for it.
Fixes #85917.