[ 0:01] | load /var/obj/divine-nightly/semidbg/test/_expand/sym/array-b.pkg.cpp/v.O0.cpp v.O0.cpp [ 0:01] | expect --result error --location v.O0.cpp:17 [ 0:01] | expect --trace FAULT: --trace-count 1 [ 0:01] | cc -o testcase.bc -std=c++14 -O0 v.O0.cpp [ 0:01] | verify --max-memory 4GiB --max-time 600 --threads 2 --report-filename verify.out --solver smtlib:z3 --symbolic testcase.bc [ 0:01] compiling v.O0.cpp [ 0:01] v.O0.cpp:17:10: warning: array index 4 is past the end of the array (which contains 4 elements) [ 0:01] if ( array[ 4 ] ) /* ERROR */ // this is undefined behaviour, it is optimized out with -O2 [ 0:01] ^ ~ [ 0:01] v.O0.cpp:14:5: note: array 'array' declared here [ 0:01] uint64_t array[ 4 ]; [ 0:01] ^ [ 0:01] 1 warning generated. [ 0:01] loading bitcode … DiOS … LART … RR … constants … done [ 0:11] booting … done [ 0:11] states per second: 105.263 [ 0:11] state count: 4 [ 0:11] mips: 0.25 [ 0:11] symbolic: 1 [ 0:12] [ 0:12] error found: yes [ 0:12] error trace: | [ 0:12] FAULT: access of size 8 at [alloca* fb3024d 20h ddp] is 8 bytes out of bounds [ 0:12] [0] FATAL: memory error in userspace [ 0:12] [ 0:12] active stack: [ 0:12] - symbol: void __dios::FaultBase::handler<__dios::Context>(_VM_Fault, _VM_Frame*, void (*)()) [ 0:12] location: /dios/sys/fault.hpp:118 [ 0:12] - symbol: main [ 0:12] location: v.O0.cpp:17 [ 0:12] - symbol: __dios_start [ 0:12] location: /dios/libc/sys/start.cpp:94 [ 0:12] + divine sim --batch --skip-init --load-report verify.out [ 0:12] [ 0:22] ^ —————. —.— . . —.— . . .————— . . [ 0:22] ——— | | | | | | |\ | | | | [ 0:22] —(o)— | | | | | | | \ | |———— '————| [ 0:22] ——————— | | | \ / | | \| | | [ 0:22] ————————— —————' —'— ' —'— ' ' '————— ' [ 0:22] [ 0:22] Welcome to 'divine sim', an interactive debugger. Type 'help' to get started. [ 0:22] traced states: [ 0:22] ▶ state #3 [new] -- active threads: [0:0] -- [ 0:22] T: FAULT: access of size 8 at [alloca* fb3024d 20h ddp] is 8 bytes out of bounds [ 0:23] # executing void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:23] # NOTE: $frame in main [ 0:23] > backtrace [ 0:23] void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:23] main at v.O0.cpp:17 [ 0:23] __dios_start at /dios/libc/sys/start.cpp:94 [ 0:23] # executing void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:23] # NOTE: $frame in main