c++ - Program received signal SIGILL, Illegal instruction -
i using linux x86_64 machine build program. have linked shared library executable. in project calling function has declared vector<string>
inside function. program gets killed when function gets called. when debugging through gdb below output get.
program received signal sigill, illegal instruction. 0x00002aaaac4d2be7 in oc_catalog_c::file_totext (this=0x611aa0) @ /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_vector.h:87 87 : _tp_alloc_type(__a), _m_start(0), _m_finish(0), _m_end_of_storage(0) (gdb) bt 0 0x00002aaaac4d2be7 in oc_catalog_c::file_totext (this=0x611aa0) @ /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_vector.h:87
is issue of compilation of shared library?? banged head enough on it. please help.
-chaks
adding more info queries: yes,function calling file_totext virtual function in class oc_catalog_c. member variable of other class has object of class oc_catalog_c have virtual function file_totext.using object calling file_totext function of oc_catlog_c virtual function file_totext. show code snippet:
class oc_catalog_c { virtual vector<string> file_totext (void) const; } class b { const oc_catalog_c* m_pcatalog; virtual vector<string> file_totext (void) const; } vector<string> b::file_totext( void ) const { vector<string> a_subdata; a_subdata = m_pcatalog->file_totext(); }
thank guys help. figured out problem causing error.
debugging more , tracing instruction found program failing @ ud2a instruction.
ignoring 1 warning "warning: cannot pass objects of non-pod type 'struct sqlrw_request_cb' through '...'; call abort @ runtime".
resolving these warnings fixed problem related sigill.
more explanation on link: ud2a instruction causing sigill
Comments
Post a Comment