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

For variadic functions, accept arbitrary trailing arguments #2058

Merged
merged 2 commits into from
Apr 8, 2022

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Apr 7, 2022

However, make sure that if we use argument N we check the size of all arguments before that, because otherwise this might not work properly depending on how varargs are implemented. This caught bugs in our futex tests. ;)

I couldn't find a good way to systematically ensure this, so it is just something we have to be on the look for during review. (This generally applies also for fixed-arg shims: we should check the size of each parameter.)

Also treat prctl like a variadic function, Cc @saethlin.

@RalfJung
Copy link
Member Author

RalfJung commented Apr 7, 2022

Also see prior discussion in rust-lang/rust#95626.

@RalfJung
Copy link
Member Author

RalfJung commented Apr 8, 2022

Looks like nobody is objecting, so let's get this shipped. :)
@bors r+

@bors
Copy link
Contributor

bors commented Apr 8, 2022

📌 Commit cac48dd has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Apr 8, 2022

⌛ Testing commit cac48dd with merge f3a9856...

@bors
Copy link
Contributor

bors commented Apr 8, 2022

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing f3a9856 to master...

@bors bors merged commit f3a9856 into rust-lang:master Apr 8, 2022
@RalfJung RalfJung deleted the variadic branch April 8, 2022 19:30
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.

2 participants