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

[mono] Avoid an assert if the class name table is too large. #85952

Merged
merged 1 commit into from
May 10, 2023

Conversation

vargaz
Copy link
Contributor

@vargaz vargaz commented May 8, 2023

Fixes #85917.

@lewing
Copy link
Member

lewing commented May 9, 2023

cc @radical

@@ -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) {
Copy link
Member

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?

Copy link
Member

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

Copy link
Contributor Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blazor WebAssembly AOT condition `table_size < 65000' not met
3 participants