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

Inline layout validation and pointer cast code to optimize out panic #1997

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

clundin25
Copy link
Contributor

If try_cast_into and validate_cast_and_convert_metadata are not inlined, then the compiler will include a panic in validate_cast_and_convert_metadata.

If these functions are inlined, then the panic can be optimized out.

Additional context can be found at #1661 (comment)

… panics in

`validate_cast_and_convert_metadata`.

If `try_cast_into` and `validate_cast_and_convert_metadata` are not
inlined, then the compiler will include a panic in `validate_cast_and_convert_metadata`.

If these functions are inlined, then the panic can be optimized out.
@jswrenn
Copy link
Collaborator

jswrenn commented Oct 31, 2024

The test failures are unrelated and known to be an issue. I'll open a PR quick to fix them, and then we can rebase this.

@jswrenn
Copy link
Collaborator

jswrenn commented Oct 31, 2024

PR backporting our earlier fix to v0.8.x: #1998

@jswrenn jswrenn added this pull request to the merge queue Oct 31, 2024
Merged via the queue into google:v0.8.x with commit dc537e7 Oct 31, 2024
87 checks passed
joshlf pushed a commit that referenced this pull request Nov 4, 2024
… panics in (#1997)

`validate_cast_and_convert_metadata`.

If `try_cast_into` and `validate_cast_and_convert_metadata` are not
inlined, then the compiler will include a panic in `validate_cast_and_convert_metadata`.

If these functions are inlined, then the panic can be optimized out.
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
… panics in (#1997) (#2013)

`validate_cast_and_convert_metadata`.

If `try_cast_into` and `validate_cast_and_convert_metadata` are not
inlined, then the compiler will include a panic in `validate_cast_and_convert_metadata`.

If these functions are inlined, then the panic can be optimized out.

Co-authored-by: Carl Lundin <[email protected]>
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