-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
support c-variadic functions in rustc_const_eval
#150601
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
folkertdev
wants to merge
40
commits into
rust-lang:main
Choose a base branch
from
folkertdev:c-variadic-const-eval
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,846
−72
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
61e2fb3
add `GlobalAlloc::VaList`
folkertdev 6b7f675
allow `const fn` to be c-variadic
folkertdev 335c8ef
make `Va::arg` and `VaList::drop` `const fn`s
folkertdev 81b534d
on call, split the standard and c-variadic arguments
folkertdev 790a67a
set up `VaList` global storage
folkertdev 52a64b7
implement `va_arg` in `rustc_const_eval`
folkertdev b8a24d6
basic support for `AllocKind::VaList` in miri
folkertdev 9d64415
add c-variadic const eval test
folkertdev 8618f25
basic `va_copy` implementation
folkertdev 6d1c529
move over to the shared interpreter
folkertdev 2acc721
more copy UB tests
folkertdev 3dfaced
stop using `reserve_and_set_va_list_alloc`
folkertdev 0e78a06
make `va_list_map` private
folkertdev 8266cc1
remove `GlobalAlloc::VaList` again
folkertdev 1c801db
add (dead) allocation bookkeeping
folkertdev 04721bc
zero the `VaList` place so it is initialized
folkertdev 83a12af
add c-variadic miri test
folkertdev b4a6323
WIP
folkertdev 99b7ec2
move va_list operations into `InterpCx`
folkertdev b74771f
`fn addr_from_alloc_id_uncached`: make va_list emit a dummy_alloc
folkertdev 4d68068
use places smarter
folkertdev ba84fa4
move things around
folkertdev 2594aea
fix formatting
folkertdev 40ef87c
rename to `self.va_list_ptr`
folkertdev b1c39ec
add more miri tests
folkertdev 342025b
Apply suggestion from @RalfJung
folkertdev ee17907
low-hanging fruit after review
folkertdev 72ced42
consider the caller location argument
folkertdev 930527c
use `transmute_copy`
folkertdev 6ac782e
split out `allocate_varargs`
folkertdev 0fa0719
report UB when caller and callee signatures do not match
folkertdev ed90238
retrieve key field without the lang item
folkertdev 6d830c3
feature-gate c-variadic definitions and calls in const contexts
folkertdev 75e66bb
clean up feature gate
folkertdev 74ed893
update tests
folkertdev 34683db
use vecdeque
folkertdev 49a5967
changes after code review
folkertdev 6db8088
Update compiler/rustc_const_eval/src/interpret/call.rs
folkertdev bb063e1
Update compiler/rustc_const_eval/src/interpret/stack.rs
folkertdev 13f1178
Update compiler/rustc_const_eval/src/interpret/stack.rs
folkertdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.