Displaying 2 results from an estimated 2 matches for "test_capi".
2016 Feb 09
3
Buildling with/without AddressSanitizer causes divergent execution behaviour
...ng a heap-use-after-free AddressSanitizer finds, I'm
not sure if this a false positive or not) but here are the basics of
what I found.
Build Z3 as follows
```
git clone https://github.com/Z3Prover/z3.git
cd z3
# Now apply the attached patch.
# Basically this makes it so that in ``examples/c/test_capi.c``
# the main() function only calls two functions.
# Note if you build without the patch when running ``c_example``
program AddressSanitizer
# reports a heap-use-after-free. I'm not sure if this a false positive
or not. Valgrind doesn't
# seem to think there's a problem.
# Build with...
2016 Feb 11
3
Buildling with/without AddressSanitizer causes divergent execution behaviour
...ATH=`pwd` ./c_example
==26936==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7fa7d906f3b0 in Z3_open_log
/home/dsl11/dev/klee/z3/z3_upstream/build_msan_clang/../src/api/api_log.cpp:33:13
#1 0x55c0c03107f5 in main
/home/dsl11/dev/klee/z3/z3_upstream/build_msan_clang/../examples/c/test_capi.c:2794:5
#2 0x7fa7d78f960f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)
#3 0x55c0c024d838 in _start
(/home/dsl11/dev/klee/z3/z3_upstream/build_msan_clang/c_example+0x1c838)
Uninitialized value was created by a heap allocation
#0 0x55c0c0253ea0 in __interceptor_malloc
(/home/dsl1...