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

Throw ub error when invoking non-vararg shim with vararg import #4181

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

tiif
Copy link
Contributor

@tiif tiif commented Feb 6, 2025

Closes #4013

@tiif
Copy link
Contributor Author

tiif commented Feb 6, 2025

Uh oh actually we need to use check_shim_variadic instead of check_shim for mremap https://docs.rs/libc/latest/libc/fn.mremap.html

@rustbot author

@rustbot rustbot added the S-waiting-on-author Status: Waiting for the PR author to address review comments label Feb 6, 2025
@tiif
Copy link
Contributor Author

tiif commented Feb 6, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Feb 6, 2025
@RalfJung
Copy link
Member

RalfJung commented Feb 6, 2025

Uh oh actually we need to use check_shim_variadic instead of check_shim for mremap https://docs.rs/libc/latest/libc/fn.mremap.html

Good catch!

@RalfJung
Copy link
Member

RalfJung commented Feb 6, 2025

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Feb 6, 2025
@tiif
Copy link
Contributor Author

tiif commented Feb 6, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Feb 6, 2025
@RalfJung
Copy link
Member

RalfJung commented Feb 6, 2025

This looks great, thanks! Please squash the commits, then we can land this. Please use the --keep-base flag when squashing so that the force-push diff is easier to review. Then write @rustbot ready after you pushed the squashed PR.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Feb 6, 2025
@tiif tiif force-pushed the check_shim_variadic branch from 7ac80de to 72444c2 Compare February 6, 2025 15:57
@tiif
Copy link
Contributor Author

tiif commented Feb 6, 2025

Done :)

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Feb 6, 2025
@RalfJung RalfJung enabled auto-merge February 6, 2025 16:25
@RalfJung RalfJung force-pushed the check_shim_variadic branch from e4a533c to 6af0914 Compare February 6, 2025 18:16
@RalfJung RalfJung added this pull request to the merge queue Feb 6, 2025
Merged via the queue into rust-lang:master with commit 4e529fa Feb 6, 2025
7 checks passed
@tiif tiif deleted the check_shim_variadic branch February 7, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting for a review to complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shims for vararg functions: check that we get the right number of "fixed" arguments
3 participants