[llvm] [MSan] Fix va_arg handling on 32-bit machines (PR #211339)
Egor Elchinov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 05:11:39 PDT 2026
Egor2001 wrote:
> @thurstond @Egor2001 Random idea, what if we make va_arg - implicit noundef? I believe all acceptable types are suppose to be noundef, we just have no place to put attribute in `...` IR. Then we check at caller, and in callee we assume zero shadow. Then we can drop all that TLS magic and significantly simplify the pass.
Unfortunately this may break memory sanitizer for the code relying on libraries like musl and others where internal `printf`-like procedures may pass partly-initialized aggregate types (e.g unions) in varargs.
It may badly affect msan usage in private projects as well.
IMHO, it'd better to ensure this patch fixes the problem with varargs at least for the major architectures since all the needed interface support for varargs is already in place.
@vitalybuka @thurstond
https://github.com/llvm/llvm-project/pull/211339
More information about the llvm-commits
mailing list