[ 0:00] compiling /home/xrockai/src/divine/nightly/test/libcxx/atomic/atomic_compare_exchange_weak.pass.cpp [ 0:00] In file included from /home/xrockai/src/divine/nightly/test/libcxx/atomic/atomic_compare_exchange_weak.pass.cpp:25: [ 0:00] In file included from /dios/libcxx/include/atomic:550: [ 0:00] In file included from /dios/libcxx/include/cstddef:44: [ 0:00] In file included from /dios/include/stddef.h:10: [ 0:00] In file included from /dios/include/_PDCLIB/int.h:16: [ 0:00] /dios/include/_PDCLIB/cdefs.h:69:10: warning: Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:00] #warning Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:00] ^ [ 0:00] 1 warning generated. [ 0:01] compiling /dios/lib/config/seqklee.bc [ 0:01] setting up pass: functionmeta, options = [ 0:02] setting up pass: fuse-ctors, options = [ 0:02] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.2/_klee_out" [ 0:04] KLEE: Using Z3 solver backend [ 0:04] WARNING: this target does not support the llvm.stacksave intrinsic. [ 0:05] 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:05] [ 0:05] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:08] KLEE: WARNING: undefined reference to function: klee_free [ 0:08] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:08] i:1 [ 0:08] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:08] about to __boot:0 [ 0:08] about to run the scheduler:0 [ 0:08] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:08] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:08] KLEE: NOTE: now ignoring this error at this location [ 0:08] KLEE: ERROR: EXITING ON ERROR: [ 0:09] Error: failed external call: __dios_tainted_init [ 0:09] File: /dios/libc/sys/start.cpp [ 0:09] Line: 87 [ 0:09] assembly.ll line: 62288 [ 0:09] Stack: [ 0:09] #000062288 in __dios_start (l=2, argc=1, argv=94608876401160, envp=94608876486664) at /dios/libc/sys/start.cpp:87 [ 0:09] #100038297 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:09] #200070536 in klee_boot (argc=2, argv=94608839563264) at /dios/arch/klee/boot.c:41 [ 0:09] [ 0:09] [ 0:09] 1 /* TAGS: c++ fin */ [ 0:09] 2 /* CC_OPTS: -std=c++2a */ [ 0:09] 3 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:09] 4 //===----------------------------------------------------------------------===// [ 0:09] 5 // [ 0:09] 6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. [ 0:09] 7 // See https://llvm.org/LICENSE.txt for license information. [ 0:09] 8 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [ 0:09] 9 // [ 0:09] 10 //===----------------------------------------------------------------------===// [ 0:09] 11 // [ 0:09] 12 // UNSUPPORTED: libcpp-has-no-threads [ 0:09] 13 // ... assertion fails line 34 [ 0:09] 14 [ 0:09] 15 // [ 0:09] 16 [ 0:09] 17 // template [ 0:09] 18 // bool [ 0:09] 19 // atomic_compare_exchange_weak(volatile atomic* obj, T* expc, T desr); [ 0:09] 20 // [ 0:09] 21 // template [ 0:09] 22 // bool [ 0:09] 23 // atomic_compare_exchange_weak(atomic* obj, T* expc, T desr); [ 0:09] 24 [ 0:09] 25 #include [ 0:09] 26 #include [ 0:09] 27 #include [ 0:09] 28 [ 0:09] 29 #include "cmpxchg_loop.h" [ 0:09] 30 #include "test_macros.h" [ 0:09] 31 #include "atomic_helpers.h" [ 0:09] 32 [ 0:09] 33 template [ 0:09] 34 struct TestFn { [ 0:09] 35 void operator()() const { [ 0:09] 36 { [ 0:09] 37 typedef std::atomic A; [ 0:09] 38 A a; [ 0:09] 39 T t(T(1)); [ 0:09] 40 std::atomic_init(&a, t); [ 0:09] 41 assert(c_cmpxchg_weak_loop(&a, &t, T(2)) == true); [ 0:09] 42 assert(a == T(2)); [ 0:09] 43 assert(t == T(1)); [ 0:09] 44 assert(std::atomic_compare_exchange_weak(&a, &t, T(3)) == false); [ 0:09] 45 assert(a == T(2)); [ 0:09] 46 assert(t == T(2)); [ 0:09] 47 } [ 0:09] 48 { [ 0:09] 49 typedef std::atomic A; [ 0:09] 50 volatile A a; [ 0:09] 51 T t(T(1)); [ 0:09] 52 std::atomic_init(&a, t); [ 0:09] 53 assert(c_cmpxchg_weak_loop(&a, &t, T(2)) == true); [ 0:09] 54 assert(a == T(2)); [ 0:09] 55 assert(t == T(1)); [ 0:09] 56 assert(std::atomic_compare_exchange_weak(&a, &t, T(3)) == false); [ 0:09] 57 assert(a == T(2)); [ 0:09] 58 assert(t == T(2)); [ 0:09] 59 } [ 0:09] 60 } [ 0:09] 61 }; [ 0:09] 62 [ 0:09] 63 int main(int, char**) [ 0:09] 64 { [ 0:09] 65 TestEachAtomicType()(); [ 0:09] 66 [ 0:09] 67 return 0; [ 0:09] 68 } [ 0:09] # no errors were expected but one was found anyway