remove LLVM va_end calls#157627
Conversation
The operation is a no-op, so we skip it.
|
r? RalfJung The changes are trivial, but technically we're introducing LLVM UB here, so passing this to you for signoff. We also don't use LLVM's But LLVM can actually see that we emit a |
|
|
|
cc @bjorn3
|
|
LLVM can also see what we @nikic what do you think? |
There was a problem hiding this comment.
What was the reason again for us not calling va_copy / va_end when cloning / dropping a VaList?
There was a problem hiding this comment.
Well another constraint on the LLVM va_end is that it must be called in the same function as the corresponding va_start or va_copy, but also va_list can be moved. So va_end does not actually correspond to rust Drop.
There was a problem hiding this comment.
LLVM can also see what we
memcpyaVaListand then callva_argon both the old and new value which is UB (because it's not documented to be allowed).
It feels different, we're not using LLVM's va_arg but our own thing, but it does modify the VaList so I guess that counts.
There was a problem hiding this comment.
Well another constraint on the LLVM va_end is that it must be called in the same function as the corresponding va_start or va_copy, but also va_list can be moved. So va_end does not actually correspond to rust Drop.
tracking issue: #44930
The operation is a no-op, so we skip it.