[PATCH] D41184: [BuildLibCalls] Cast length argument to the correct integer type
Igor Laevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 06:53:16 PST 2017
igor-laevsky created this revision.
igor-laevsky added reviewers: spatel, eli.friedman, mehdi_amini, bogner.
Some library calls expect length argument which has pointer sized integer type. However we may create such calls with the actual length parameter typed with the different integer type. For such cases we need to emit correct cast instead of crashing with the assertion failure.
I believe it's hard to encounter in the real world practice but this comes up in the llvm-opt-fuzzer testing.
Repository:
rL LLVM
https://reviews.llvm.org/D41184
Files:
lib/Transforms/Utils/BuildLibCalls.cpp
test/Transforms/InstCombine/strncmp-wrong-datalayout.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41184.126755.patch
Type: text/x-patch
Size: 4517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171213/a92e7a8c/attachment.bin>
More information about the llvm-commits
mailing list