[ 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 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:13] booting … done [ 0:13] states per second: 86.9565 [ 0:13] state count: 4 [ 0:13] mips: 0.21 [ 0:13] symbolic: 1 [ 0:14] [ 0:14] error found: yes [ 0:14] error trace: | [ 0:14] FAULT: access of size 8 at [alloca* fb3024d 20h ddp] is 8 bytes out of bounds [ 0:14] [0] FATAL: memory error in userspace [ 0:14] [ 0:14] active stack: [ 0:14] - symbol: void __dios::FaultBase::handler<__dios::Context>(_VM_Fault, _VM_Frame*, void (*)()) [ 0:14] location: /dios/sys/fault.hpp:118 [ 0:14] - symbol: main [ 0:14] location: v.O0.cpp:17 [ 0:14] - symbol: __dios_start [ 0:14] location: /dios/libc/sys/start.cpp:94 [ 0:14] + divine sim --batch --skip-init --load-report verify.out [ 0:14] [ 0:24] ^ —————. —.— . . —.— . . .————— . . [ 0:24] ——— | | | | | | |\ | | | | [ 0:24] —(o)— | | | | | | | \ | |———— '————| [ 0:24] ——————— | | | \ / | | \| | | [ 0:24] ————————— —————' —'— ' —'— ' ' '————— ' [ 0:24] [ 0:24] Welcome to 'divine sim', an interactive debugger. Type 'help' to get started. [ 0:24] traced states: [ 0:25] ▶ state #3 [new] -- active threads: [0:0] -- [ 0:25] T: FAULT: access of size 8 at [alloca* fb3024d 20h ddp] is 8 bytes out of bounds [ 0:25] # executing void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:25] # NOTE: $frame in main [ 0:25] > backtrace [ 0:25] void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:25] main at v.O0.cpp:17 [ 0:25] __dios_start at /dios/libc/sys/start.cpp:94 [ 0:25] # executing void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:25] # NOTE: $frame in main