diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-03 00:32:34 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-03 00:32:34 +0000 |
commit | 928784d387e55381aa407dc168bcf422dc40a69c (patch) | |
tree | 6c0b738fa8e8f4694932bc133a757b87182ab649 /lib/Core/SpecialFunctionHandler.cpp | |
parent | 52949d8150332edba6e7ba579552dbd8c2a856e1 (diff) | |
download | klee-928784d387e55381aa407dc168bcf422dc40a69c.tar.gz |
Fix computation of GetElementPtr offset for 64-bit targets.
- Precomputed constants were being truncated to 32-bits! - This was actually the problem with new[]/delete[], I failed to look at the generated code for new[] to realize that the compiler is generating the offset pointer, not the runtime library. - All tests now pass on x86-64! git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@77930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Core/SpecialFunctionHandler.cpp')
-rw-r--r-- | lib/Core/SpecialFunctionHandler.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp index c23d626c..45202c19 100644 --- a/lib/Core/SpecialFunctionHandler.cpp +++ b/lib/Core/SpecialFunctionHandler.cpp @@ -330,8 +330,6 @@ void SpecialFunctionHandler::handleDelete(ExecutionState &state, void SpecialFunctionHandler::handleNewArray(ExecutionState &state, KInstruction *target, std::vector<ref<Expr> > &arguments) { - // FIXME: This is broken, it doesn't allocate space for the count. - // XXX should type check args assert(arguments.size()==1 && "invalid number of arguments to new[]"); executor.executeAlloc(state, arguments[0], false, target); @@ -340,8 +338,6 @@ void SpecialFunctionHandler::handleNewArray(ExecutionState &state, void SpecialFunctionHandler::handleDeleteArray(ExecutionState &state, KInstruction *target, std::vector<ref<Expr> > &arguments) { - // FIXME: This is broken, it doesn't allocate space for the count. - // XXX should type check args assert(arguments.size()==1 && "invalid number of arguments to delete[]"); executor.executeFree(state, arguments[0]); |