g13
g13 copied to clipboard
no work "Instrucción ilegal"
Hi, sorry for my bad English. I had g13 running for a long time, but I upgraded to Debian Trixie and I can't get it to work.
I download, compile and get these warnings, although it generates the file.
g13.cc: In member function 'int G13::G13_Manager::run()': g13.cc:791:1: warning: control reaches end of non-void function [-Wreturn-type]. 791 | }
In file included from g13.h:5,
from g13_keys.cc:4:
'helper.hpp: In instantiation of 'STREAM_T& Helper::operator<<(STREAM_T&, const _map_keys_out<MAP_T>&) [with STREAM_T = boost::log::v2_mt_posix::basic_record_ostream
When I try to run it with ./g13d I get the following error.
./g13d [2024-03-22 02:36:43.265857] [0x00007ff7a4668240] [info] set log level to info [2024-03-22 02:36:43.266118] [0x00007ff7a4668240] [info] Known keys on G13: Instrucción ilegal
Thank you.
I also tried this, but the project seems unmaintained (apologies if it is not). I also got the message mentioned by @Quilex above.
I debugged this in gdb, and the debug session output is below, in case anybody still reads this and can do anything with it:
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[2024-04-20 16:01:06.919955] [0x00007ffff7e6d240] [info] set log level to info
[2024-04-20 16:01:06.920096] [0x00007ffff7e6d240] [info] Known keys on G13:
Program received signal SIGILL, Illegal instruction.
0x00005555555a0a4d in Helper::operator<< <boost::log::v2_mt_posix::basic_record_ostream<char>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > > > (o=..., _mko=...)
at /home/lindem/git/g13/helper.hpp:173
173 for( auto i = _mko.container.begin(); i != _mko.container.end(); i++ ) {
I looked at the code, but I have not done C++ literally in decades, and did not accomplish anything noteworthy. This was on Ubuntu 23.10, by the way.
Shame that my old G13 seemingly reached the end of its life if there is no more software which supports it. Thanks @ecraven for making this back then.
This is a problem with helper.hpp, the function at line 170 does not return a value. Add "return o;" at the end, and recompile.
170 template <class STREAM_T, class MAP_T>
171 STREAM_T &operator <<( STREAM_T &o, const _map_keys_out<MAP_T> &_mko ) {
172 bool first = true;
173 for( auto i = _mko.container.begin(); i != _mko.container.end(); i++ ) {
174 if( first ) {
175 first = false;
176 o << i->first;
177 } else {
178 o << _mko.sep << i->first;
179 }
180 }
181 return o; // XXX Add this line!
182 };
After that, the SIGILL is gone, and working as usual. (Fedora 41).
I haven't used this myself in a long time, sorry for that. I've merged a few pull requests, one of them fixed this missing return value. Can you try whether it works for you now?