-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use correct llvm mem in matchArg. * Change SMT solver for symbolic execution to Z3. Add timeout. * Translate a SAWCore constant to a What4 constant in mkUninterpretedSAW, instead of an uninterpreted function without parameters. * Add option for SAWCore to What4 translation for Crucible symbolic execution. * Refactor SAWScript.Crucible.LLVM.X86. * Add llvm_alloc_sym_init SAW command. * Match arrays at non-zero offsets. * Fix typo. * Add W4EvalTactic newtype. * Add LLVMAllocSpecInit datatype. * Add set_crucible_timeout command. * Edit changelog. * Set crucible timeout in saw-remote-api. * Handle llvm_alloc_sym_init in LLVM X86. * Add disable_alloc_sym_init_check command. * Improve documentation.
- Loading branch information
1 parent
8abb655
commit 3b10862
Showing
15 changed files
with
458 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <stdlib.h> | ||
|
||
int f(int *x) | ||
{ | ||
return *x; | ||
} | ||
|
||
int test_f_calloc() | ||
{ | ||
int *x = (int *) calloc(1, sizeof(int)); | ||
return f(x); | ||
} | ||
|
||
int test_f_malloc() | ||
{ | ||
int *x = (int *) malloc(sizeof(int)); | ||
return f(x); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
enable_experimental; | ||
|
||
m <- llvm_load_module "test.bc"; | ||
|
||
let f_spec = do { | ||
x_ptr <- llvm_alloc_sym_init (llvm_int 32); | ||
llvm_execute_func [x_ptr]; | ||
x <- llvm_fresh_var "x" (llvm_int 32); | ||
llvm_return (llvm_term x); | ||
}; | ||
|
||
let test_spec = do { | ||
llvm_execute_func []; | ||
x <- llvm_fresh_var "x" (llvm_int 32); | ||
llvm_return (llvm_term x); | ||
}; | ||
|
||
f_ov <- llvm_verify m "f" [] false f_spec trivial; | ||
llvm_verify m "test_f_calloc" [f_ov] false test_spec trivial; | ||
fails (llvm_verify m "test_f_malloc" [f_ov] false test_spec trivial); | ||
disable_alloc_sym_init_check; | ||
llvm_verify m "test_f_malloc" [f_ov] false test_spec trivial; | ||
enable_alloc_sym_init_check; | ||
fails (llvm_verify m "test_f_malloc" [f_ov] false test_spec trivial); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
set -e | ||
|
||
$SAW test.saw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.