Boolector / boolector

A Satisfiability Modulo Theories (SMT) solver for the theories of fixed-size bit-vectors, arrays and uninterpreted functions.
http://boolector.github.io
Other
325 stars 63 forks source link

Segment fault at btorexp.c:252 #97

Closed rainoftime closed 4 years ago

rainoftime commented 4 years ago

Hi, for the following formula,

(set-logic BV)
(declare-const bv_3-0 (_ BitVec 3))
(assert (not (forall ((q13 (_ BitVec 3))) (not (= bv_3-0 q13 (bvsdiv bv_3-0 (_ bv0 3)) q13 bv_3-0)))))
(check-sat)

boolector (commit 76aafdf) throws a seg fault

=================================================================
==97139==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000030 (pc 0x7fbfebc524ad bp 0x7ffe6beef420 sp 0x7ffe6beef400 T0)
    #0 0x7fbfebc524ac in btor_exp_cond /home/peisen/test/tofuzz/boolector/src/btorexp.c:252
    #1 0x7fbfebc5179c in btor_exp_create /home/peisen/test/tofuzz/boolector/src/btorexp.c:75
    #2 0x7fbfebe2e281 in elim_vars /home/peisen/test/tofuzz/boolector/src/preprocess/btorder.c:401
    #3 0x7fbfebe2e9c8 in btor_cer_node /home/peisen/test/tofuzz/boolector/src/preprocess/btorder.c:445
    #4 0x7fbfebd4beea in simplify /home/peisen/test/tofuzz/boolector/src/btorslvquant.c:2587
    #5 0x7fbfebd4c151 in sat_quant_solver /home/peisen/test/tofuzz/boolector/src/btorslvquant.c:2611
    #6 0x7fbfebc4551c in btor_check_sat /home/peisen/test/tofuzz/boolector/src/btorcore.c:3036
    #7 0x7fbfebb4396f in boolector_sat /home/peisen/test/tofuzz/boolector/src/boolector.c:639
    #8 0x7fbfebe1ef90 in check_sat /home/peisen/test/tofuzz/boolector/src/parser/btorsmt2.c:4529
    #9 0x7fbfebe22a0b in read_command_smt2 /home/peisen/test/tofuzz/boolector/src/parser/btorsmt2.c:4695
    #10 0x7fbfebe25937 in parse_smt2_parser /home/peisen/test/tofuzz/boolector/src/parser/btorsmt2.c:4952
    #11 0x7fbfebc9eeae in parse_aux /home/peisen/test/tofuzz/boolector/src/btorparse.c:68
    #12 0x7fbfebca0ae6 in btor_parse /home/peisen/test/tofuzz/boolector/src/btorparse.c:235
    #13 0x7fbfebbadaeb in boolector_parse /home/peisen/test/tofuzz/boolector/src/boolector.c:4680
    #14 0x40cb32 in boolector_main /home/peisen/test/tofuzz/boolector/src/btormain.c:1440
    #15 0x4024f5 in main /home/peisen/test/tofuzz/boolector/src/boolectormain.c:17
    #16 0x7fbfeb6ab82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)