projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3636f4e
)
Use regular old malloc to emulate malloc/alloca instructions.
author
Brian Gaeke
<gaeke@uiuc.edu>
Wed, 5 Nov 2003 01:02:14 +0000
(
01:02
+0000)
committer
Brian Gaeke
<gaeke@uiuc.edu>
Wed, 5 Nov 2003 01:02:14 +0000
(
01:02
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9713
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/ExecutionEngine/Interpreter/Execution.cpp
patch
|
blob
|
history
diff --git
a/lib/ExecutionEngine/Interpreter/Execution.cpp
b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 66b8b5414088cd02d679bec0f254afc259d62a6d..783feb1d6c356c3832e26625b73a4c32c805dba8 100644
(file)
--- a/
lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/
lib/ExecutionEngine/Interpreter/Execution.cpp
@@
-546,8
+546,7
@@
void Interpreter::visitAllocationInst(AllocationInst &I) {
unsigned NumElements = getOperandValue(I.getOperand(0), SF).UIntVal;
// Allocate enough memory to hold the type...
- // FIXME: Don't use CALLOC, use a tainted malloc.
- void *Memory = calloc(NumElements, TD.getTypeSize(Ty));
+ void *Memory = malloc(NumElements * TD.getTypeSize(Ty));
GenericValue Result = PTOGV(Memory);
assert(Result.PointerVal != 0 && "Null pointer returned by malloc!");