[PATCH] Make variable argument intrinsics behave correctly in a Win64 CC function.
Evgeniy Stepanov
eugenis at google.com
Fri Sep 13 02:14:48 PDT 2013
================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:1941
@@ +1940,3 @@
+ if (Cast->getSrcTy() ==
+ Type::getInt8PtrTy(Cast->getContext())->getPointerTo())
+ return;
----------------
Evgeniy Stepanov wrote:
> This looks very fragile.
> Why can't you decide this based on the calling convention of the instrumented function?
OK, va_list may be from a function with a different calling convention.
I don't see a better way to detect this, but... how does va_copy work in this case? It gets plain i8* as an argument.
http://llvm-reviews.chandlerc.com/D1622
BRANCH
x64-ms-va_list
ARCANIST PROJECT
llvm
More information about the llvm-commits
mailing list