[PATCH] [dfsan] New calling convention for custom functions with variadic arguments.

Peter Collingbourne peter at pcc.me.uk
Wed Oct 29 12:56:25 PDT 2014


Hi martignlo,

The previous calling convention prevented custom functions from being able
to access argument labels unless it knew how many variadic arguments there
were, and of which type. This restriction made it impossible to correctly
model functions in the printf family, as it is legal to pass more arguments
than required to those functions. We now pass arguments in the following order:

non-vararg arguments
labels for non-vararg arguments
[if vararg function, pointer to array of labels for vararg arguments]
[if non-void function, pointer to label for return value]
vararg arguments

http://reviews.llvm.org/D6028

Files:
  lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
  test/Instrumentation/DataFlowSanitizer/abilist.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6028.15553.patch
Type: text/x-patch
Size: 7026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141029/06901ae7/attachment.bin>


More information about the llvm-commits mailing list