Skip to content

c-variadic: va_arg fixes #155622

Open
folkertdev wants to merge 3 commits intorust-lang:mainfrom
folkertdev:va-arg-llvm-fixes
Open

c-variadic: va_arg fixes #155622
folkertdev wants to merge 3 commits intorust-lang:mainfrom
folkertdev:va-arg-llvm-fixes

Conversation

@folkertdev
Copy link
Copy Markdown
Contributor

tracking issue: #44930

extracts some generic LLVM va_arg fixes from #152576 and #155429.

r? tgross35

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 21, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 21, 2026

tgross35 is currently at their maximum review capacity.
They may take a while to respond.

@folkertdev folkertdev changed the title Va arg llvm fixes c-variadic: va_arg fixes Apr 21, 2026
Copy link
Copy Markdown
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable so r=me, but it would be nice to have reasoning in the third commit's message. I'm not sure whether that is preventative, fixing a current bug, or just cleanup.

View changes since this review

@folkertdev
Copy link
Copy Markdown
Contributor Author

A combination. It starts segfaulting the compiler when using i128, but the issue kind of makes sense because we tell LLVM we'll provide an i32 but actually give it an i64 so LLVM starts doing some weird automatic conversions.

we were saying that the type is i32, but would often provide an i64.
That never failed so far, but starts failing (like, crashing LLVM) when
working with 128-bit values that are 16-byte aligned. So, we may as well
use the more robust approach now.
@folkertdev
Copy link
Copy Markdown
Contributor Author

@bors r=tgross35 rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 22, 2026

📌 Commit 5149a31 has been approved by tgross35

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants