Skip to content

Sema: Fix crash issue of writing to reinterpreted 0-sized array at co… #23640

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

flyfish30
Copy link
Contributor

@flyfish30 flyfish30 commented Apr 22, 2025

Fixes #21202
Fixes #21508

Add more checks for 0-sized array in function prepareComptimePtrStore and bitCastSpliceInner.
The bytes occupied by arrays need to consider memory alignment, but zero-sized arrays do not need to consider memory alignment.

@flyfish30
Copy link
Contributor Author

@Vexu Please review this PR.

flyfish30 and others added 2 commits April 22, 2025 15:36
…0-sized array

The bytes occupied by arrays need to consider memory alignment, but zero-sized
arrays do not need to consider memory alignment.
@flyfish30
Copy link
Contributor Author

@Vexu I had resolved your comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants