Skip to content

path-based symex throws map out of range error #2866

Closed
@polgreen

Description

@polgreen

Path based symex throws the following error with :

terminate called after throwing an instance of 'std::out_of_range'
  what():  _Map_base::at

Stack trace

#0  0x0000000000a9e2b8 in raise ()
#1  0x0000000000a9e7ea in abort ()
#2  0x0000000000a6c18d in __gnu_cxx::__verbose_terminate_handler() ()
#3  0x00000000009dd7d6 in __cxxabiv1::__terminate(void (*)()) ()
#4  0x00000000009dd821 in std::terminate() ()
#5  0x00000000009dc9d9 in __cxa_throw ()
#6  0x0000000000a14dff in std::__throw_out_of_range(char const*) ()
#7  0x000000000080be83 in std::__detail::_Map_base<dstringt, std::pair<dstringt const, local_safe_pointerst>, std::allocator<std::pair<dstringt const, local_safe_pointerst> >, std::__detail::_Select1st, std::equal_to<dstringt>, std::hash<dstringt>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, true>::at(dstringt const&) () at /usr/include/c++/5/bits/hashtable_policy.h:646
#8  0x000000000080be09 in std::unordered_map<dstringt, local_safe_pointerst, std::hash<dstringt>, std::equal_to<dstringt>, std::allocator<std::pair<dstringt const, local_safe_pointerst> > >::at(dstringt const&) () at /usr/include/c++/5/bits/unordered_map.h:685
#9  0x000000000080adc7 in goto_symext::dereference_rec(exprt&, goto_symex_statet&, guardt&, bool) () at symex_dereference.cpp:250
#10 0x000000000080b79d in goto_symext::dereference_rec(exprt&, goto_symex_statet&, guardt&, bool) () at symex_dereference.cpp:355
#11 0x000000000080b79d in goto_symext::dereference_rec(exprt&, goto_symex_statet&, guardt&, bool) () at symex_dereference.cpp:355
#12 0x000000000080b79d in goto_symext::dereference_rec(exprt&, goto_symex_statet&, guardt&, bool) () at symex_dereference.cpp:355
#13 0x000000000080bb3b in goto_symext::dereference(exprt&, goto_symex_statet&, bool) () at symex_dereference.cpp:373
#14 0x0000000000806910 in goto_symext::clean_expr(exprt&, goto_symex_statet&, bool) () at symex_clean_expr.cpp:144
#15 0x000000000081517a in goto_symext::symex_goto(goto_symex_statet&) () at symex_goto.cpp:28
#16 0x000000000081e662 in goto_symext::symex_step(std::function<goto_functiont const& ()(dstringt const&)> const&, goto_symex_statet&) () at symex_main.cpp:349
#17 0x00000000005ca4af in symex_bmct::symex_step(std::function<goto_functiont const& ()(dstringt const&)> const&, goto_symex_statet&) () at symex_bmc.cpp:66
#18 0x000000000081d7e6 in goto_symext::symex_threaded_step(goto_symex_statet&, std::function<goto_functiont const& ()(dstringt const&)> const&) () at symex_main.cpp:151
#19 0x000000000081db28 in goto_symext::symex_with_state(goto_symex_statet&, std::function<goto_functiont const& ()(dstringt const&)> const&, symbol_tablet&) () at symex_main.cpp:201
#20 0x000000000081dd51 in goto_symext::resume_symex_from_saved_state(std::function<goto_functiont const& ()(dstringt const&)> const&, goto_symex_statet const&, symex_target_equationt*, symbol_tablet&) ()
    at symex_main.cpp:242
#21 0x00000000005913bb in path_explorert::perform_symbolic_execution(std::function<goto_functiont const& ()(dstringt const&)>) () at bmc.cpp:709
#22 0x000000000058e439 in bmct::execute(abstract_goto_modelt&) () at bmc.cpp:334
#23 0x000000000058f423 in bmct::run(abstract_goto_modelt&) () at bmc.cpp:486
#24 0x000000000059061b in bmct::do_language_agnostic_bmc(path_strategy_choosert const&, optionst const&, abstract_goto_modelt&, ui_message_handlert::uit const&, messaget&, std::function<void ()(bmct&, symbol_tablet const&)>, std::function<bool ()()>) () at bmc.cpp:648
#25 0x00000000005aee90 in cbmc_parse_optionst::doit() () at cbmc_parse_options.cpp:539
#26 0x00000000009ca528 in parse_options_baset::main() () at parse_options.cpp:66
#27 0x00000000005a9f8c in main () at cbmc_main.cpp:46

Binary:
https://s3.amazonaws.com/cbmc-public-bucket/pathsymex_test.binary

Command:

cbmc --paths fifo pathsymex_test.binary

(Error is independent of whether fifo or lifo is used)

Maybe of interest to @karkhaz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions