Note that there are some explanatory texts on larger screens.

plurals
  1. POC++ stl, Segmentation fault on definition
    primarykey
    data
    text
    <p>I receive <code>Segmentation fault</code> in my code. here is gdb backtrack:</p> <pre><code>(gdb) backtrace #0 __copy_m&lt;crest::SymbolicPred* const*, crest::SymbolicPred const**&gt; (__first=&lt;optimized out&gt;, __result=&lt;optimized out&gt;, __last=&lt;optimized out&gt;) at /usr/include/c++/4.4/bits/stl_algobase.h:343 #1 __copy_move_a&lt;false, crest::SymbolicPred* const*, crest::SymbolicPred const**&gt; (__last=&lt;optimized out&gt;, __first=0x0, __result=&lt;optimized out&gt;) at /usr/include/c++/4.4/bits/stl_algobase.h:397 #2 __copy_move_a2&lt;false, __gnu_cxx::__normal_iterator&lt;crest::SymbolicPred* const*, std::vector&lt;crest::SymbolicPred*, std::allocator&lt;crest::SymbolicPred*&gt; &gt; &gt;, crest::SymbolicPred const**&gt; (__first=..., __result=&lt;optimized out&gt;, __last=...) at /usr/include/c++/4.4/bits/stl_algobase.h:436 #3 copy&lt;__gnu_cxx::__normal_iterator&lt;crest::SymbolicPred* const*, std::vector&lt;crest::SymbolicPred*, std::allocator&lt;crest::SymbolicPred*&gt; &gt; &gt;, crest::SymbolicPred const**&gt; (__first=..., __result=&lt;optimized out&gt;, __last=...) at /usr/include/c++/4.4/bits/stl_algobase.h:468 #4 uninitialized_copy&lt;__gnu_cxx::__normal_iterator&lt;crest::SymbolicPred* const*, std::vector&lt;crest::SymbolicPred*, std::allocator&lt;crest::SymbolicPred*&gt; &gt; &gt;, crest::SymbolicPred const**&gt; (__first=..., __result=&lt;optimized out&gt;, __last=...) at /usr/include/c++/4.4/bits/stl_uninitialized.h:93 #5 uninitialized_copy&lt;__gnu_cxx::__normal_iterator&lt;crest::SymbolicPred* const*, std::vector&lt;crest::SymbolicPred*, std::allocator&lt;crest::SymbolicPred*&gt; &gt; &gt;, crest::SymbolicPred const**&gt; (__first=..., __result=&lt;optimized out&gt;, __last=...) at /usr/include/c++/4.4/bits/stl_uninitialized.h:117 #6 __uninitialized_copy_a&lt;__gnu_cxx::__normal_iterator&lt;crest::SymbolicPred* const*, std::vector&lt;crest::SymbolicPred*, std::allocator&lt;crest::SymbolicPred*&gt; &gt; &gt;, crest::SymbolicPred const**, crest::SymbolicPred const*&gt; (__result=&lt;optimized out&gt;, __first=..., __last=...) at /usr/include/c++/4.4/bits/stl_uninitialized.h:257 #7 _M_range_initialize&lt;__gnu_cxx::__normal_iterator&lt;crest::SymbolicPred* const*, std::vector&lt;crest::SymbolicPred*, std::allocator&lt;crest::SymbolicPred*&gt; &gt; &gt; &gt; (__first=..., __last=..., this=&lt;optimized out&gt;) at /usr/include/c++/4.4/bits/stl_vector.h:1024 #8 _M_initialize_dispatch&lt;__gnu_cxx::__normal_iterator&lt;crest::SymbolicPred* const*, std::vector&lt;crest::SymbolicPred*, std::allocator&lt;crest::SymbolicPred*&gt; &gt; &gt; &gt; (__last=..., this=&lt;optimized out&gt;, __first=...) at /usr/include/c++/4.4/bits/stl_vector.h:1002 #9 vector&lt;__gnu_cxx::__normal_iterator&lt;crest::SymbolicPred* const*, std::vector&lt;crest::SymbolicPred*, std::allocator&lt;crest::SymbolicPred*&gt; &gt; &gt; &gt; (__a=..., __last=..., __first=..., this=&lt;optimized out&gt;) at /usr/include/c++/4.4/bits/stl_vector.h:303 #10 crest::Search::SolveAtBranch (this=0x839ef80, ex=..., branch_idx=0, input=0xbffff704) at run_crest/concolic_search.cc:325 #11 0x0807efa3 in crest::SharkSearch::makeNextInput (this=0x839ef80, input=0xbffff704) at run_crest/concolic_search.cc:1536 #12 0x080866c0 in crest::SharkSearch::Run (this=0x839ef80) at run_crest/concolic_search.cc:1418 #13 0x0807be4c in main (argc=4, argv=0xbffff834) at run_crest/run_crest.cc:64 </code></pre> <p>and here is some part of <code>SolveAtBranch</code> code:</p> <pre><code>bool Search::SolveAtBranch(const SymbolicExecution&amp; ex, size_t branch_idx, vector&lt;value_t&gt;* input) { const vector&lt;SymbolicPred*&gt;&amp; constraints = ex.path().constraints(); vector&lt;const SymbolicPred*&gt; cs(constraints.begin(), constraints.begin()+branch_idx+1); /// ... </code></pre> <p>Error line (325) is <code>vector&lt;const SymbolicPred*&gt; cs(constraints.begin(), constraints.begin()+branch_idx+1);</code> and error is occurred in a vector definition.</p> <p>When I modify the code, and compile it again, error changes and other stl definition throws error. I dont know what is the problem with this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload