[ 0:01] compiling /home/xrockai/src/divine/nightly/test/libcxx/deque/shrink_to_fit.pass.cpp [ 0:01] compiling /dios/lib/config/seqklee.bc [ 0:02] setting up pass: functionmeta, options = [ 0:04] setting up pass: fuse-ctors, options = [ 0:04] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.5/_klee_out" [ 0:08] KLEE: Using Z3 solver backend [ 0:08] WARNING: this target does not support the llvm.stacksave intrinsic. [ 0:08] warning: Linking two modules of different target triples: klee_div_zero_check.bc' is 'x86_64-unknown-linux-gnu' whereas 'klee.bc' is 'x86_64-unknown-none-elf' [ 0:09] [ 0:09] KLEE: WARNING: undefined reference to function: _Z10klee_abortv [ 0:14] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:14] KLEE: WARNING: undefined reference to function: klee_free [ 0:14] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:14] KLEE: WARNING ONCE: Using zero size array fix for landingpad instruction filter [ 0:14] i:1 [ 0:14] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:14] about to __boot:0 [ 0:14] about to run the scheduler:0 [ 0:14] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:14] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:14] KLEE: NOTE: now ignoring this error at this location [ 0:14] KLEE: ERROR: EXITING ON ERROR: [ 0:15] Error: failed external call: __dios_tainted_init [ 0:15] File: /dios/libc/sys/start.cpp [ 0:15] Line: 87 [ 0:15] assembly.ll line: 93967 [ 0:15] Stack: [ 0:15] #000093967 in __dios_start (l=0, argc=1, argv=94315027395080, envp=94315027480584) at /dios/libc/sys/start.cpp:87 [ 0:15] #100041796 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:15] #200102547 in klee_boot (argc=2, argv=94314994158976) at /dios/arch/klee/boot.c:41 [ 0:15] [ 0:15] [ 0:15] 1 /* TAGS: c++ */ [ 0:15] 2 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:15] 3 //===----------------------------------------------------------------------===// [ 0:15] 4 // [ 0:15] 5 // The LLVM Compiler Infrastructure [ 0:15] 6 // [ 0:15] 7 // This file is dual licensed under the MIT and the University of Illinois Open [ 0:15] 8 // Source Licenses. See LICENSE.TXT for details. [ 0:15] 9 // [ 0:15] 10 //===----------------------------------------------------------------------===// [ 0:15] 11 [ 0:15] 12 // [ 0:15] 13 [ 0:15] 14 // void shrink_to_fit(); [ 0:15] 15 [ 0:15] 16 #include [ 0:15] 17 #include [ 0:15] 18 [ 0:15] 19 #include "min_allocator.h" [ 0:15] 20 [ 0:15] 21 template [ 0:15] 22 C [ 0:15] 23 make(int size, int start = 0 ) [ 0:15] 24 { [ 0:15] 25 const int b = 4096 / sizeof(int); [ 0:15] 26 int init = 0; [ 0:15] 27 if (start > 0) [ 0:15] 28 { [ 0:15] 29 init = (start+1) / b + ((start+1) % b != 0); [ 0:15] 30 init *= b; [ 0:15] 31 --init; [ 0:15] 32 } [ 0:15] 33 C c(init, 0); [ 0:15] 34 for (int i = 0; i < init-start; ++i) [ 0:15] 35 c.pop_back(); [ 0:15] 36 for (int i = 0; i < size; ++i) [ 0:15] 37 c.push_back(i); [ 0:15] 38 for (int i = 0; i < start; ++i) [ 0:15] 39 c.pop_front(); [ 0:15] 40 return c; [ 0:15] 41 } [ 0:15] 42 [ 0:15] 43 template [ 0:15] 44 void [ 0:15] 45 test(C& c1) [ 0:15] 46 { [ 0:15] 47 C s = c1; [ 0:15] 48 c1.shrink_to_fit(); [ 0:15] 49 assert(c1 == s); [ 0:15] 50 } [ 0:15] 51 [ 0:15] 52 template [ 0:15] 53 void [ 0:15] 54 testN(int start, int N) [ 0:15] 55 { [ 0:15] 56 typedef typename C::const_iterator CI; [ 0:15] 57 C c1 = make(N, start); [ 0:15] 58 test(c1); [ 0:15] 59 } [ 0:15] 60 [ 0:15] 61 int main() [ 0:15] 62 { [ 0:15] 63 { [ 0:15] 64 int rng[] = {0, 1, 2, 3}; [ 0:15] 65 const int N = sizeof(rng)/sizeof(rng[0]); [ 0:15] 66 for (int i = 0; i < N; ++i) [ 0:15] 67 for (int j = 0; j < N; ++j) [ 0:15] 68 testN >(rng[i], rng[j]); [ 0:15] 69 } [ 0:15] 70 #if __cplusplus >= 201103L [ 0:15] 71 { [ 0:15] 72 int rng[] = {0, 1, 2, 3}; [ 0:15] 73 const int N = sizeof(rng)/sizeof(rng[0]); [ 0:15] 74 for (int i = 0; i < N; ++i) [ 0:15] 75 for (int j = 0; j < N; ++j) [ 0:15] 76 testN> >(rng[i], rng[j]); [ 0:15] 77 } [ 0:15] 78 #endif [ 0:15] 79 } [ 0:15] # no errors were expected but one was found anyway