diff options
author | Mark Seaborn <mseaborn@chromium.org> | 2013-04-12 12:53:42 -0700 |
---|---|---|
committer | Mark Seaborn <mseaborn@chromium.org> | 2013-04-12 12:53:42 -0700 |
commit | eb6ea25e95165fe6467512d759bbcf020e352351 (patch) | |
tree | 5c78731307370fb3b80be43a60d8fc7456501df0 /test/NaCl/PNaClABI/abi-varargs.ll | |
parent | 6ea81f7c3e816f7fb9c8ff9a9f2ea961865ff03c (diff) |
PNaCl ABI checker: Disallow va_arg, varargs functions and varargs calls
This doesn't disallow the va_start/va_end/va_copy intrinsics yet;
these will get disallowed later when we add whitelisting of intrinsics
to the PNaCl ABI checker.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3338
TEST=test/NaCl/PNaClABI/*.ll
Review URL: https://codereview.chromium.org/13884013
Diffstat (limited to 'test/NaCl/PNaClABI/abi-varargs.ll')
-rw-r--r-- | test/NaCl/PNaClABI/abi-varargs.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/NaCl/PNaClABI/abi-varargs.ll b/test/NaCl/PNaClABI/abi-varargs.ll new file mode 100644 index 0000000000..2a299f5493 --- /dev/null +++ b/test/NaCl/PNaClABI/abi-varargs.ll @@ -0,0 +1,13 @@ +; RUN: pnacl-abicheck < %s | FileCheck %s + +define void @varargs_func(i32 %arg, ...) { + ret void +} +; CHECK: Function varargs_func is a variable-argument function (disallowed) + +define void @call_varargs_func(i32 %ptr) { + %ptr2 = inttoptr i32 %ptr to void (i32, ...)* + call void (i32, ...)* %ptr2(i32 123) + ret void +} +; CHECK: Function call_varargs_func contains a disallowed varargs function call |