OSDN Git Service

[MergeFunc] Prevent silent miscompile of vararg functions
authorVedant Kumar <vsk@apple.com>
Thu, 17 Jan 2019 02:15:05 +0000 (02:15 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 17 Jan 2019 02:15:05 +0000 (02:15 +0000)
commitf782a152e69284d9d0bcf9a6a250a323b807b866
tree281e5286dabd1c27d6153b28030a0af073746ece
parent017cb3b47a463ade4baa5f1322e27e1880f90b8a
[MergeFunc] Prevent silent miscompile of vararg functions

The function merging pass miscompiles identical vararg functions. The
forwarding thunk it emits doesn't forward the full variable-length list
of arguments. Disable merging for vararg functions for now.

I've filed llvm.org/PR40345 to track the issue.

rdar://47326238

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351411 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/MergeFunctions.cpp
test/Transforms/MergeFunc/va_arg.ll [new file with mode: 0644]