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

Fix crash when using sizeof as global variable initializer #3166

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

aneshlya
Copy link
Collaborator

@aneshlya aneshlya commented Jan 9, 2025

Fixes crash from #3084.

Copy link
Collaborator

@nurmukhametov nurmukhametov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@dbabokin dbabokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

One question though - do you really need to check IR and not just check that it's not crashing? This way the test will work on any platform.

@aneshlya
Copy link
Collaborator Author

It's not necessary to check IR for this particular fix, but we have some issues with sizeof like #2775 and #2181 where the code produced doesn't look right. So i want to ensure here that it's right at least for global variables initialization.
Probably splitting a test into two is a good idea.

@aneshlya aneshlya enabled auto-merge (rebase) January 10, 2025 21:29
@aneshlya aneshlya merged commit c9ee084 into ispc:main Jan 10, 2025
69 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants