I'm compiling a program on Ubuntu 14.04.3. I then copy it to an Amazon AWS server running Ubuntu 14.04.2. Yet it instantly crashes with Illegal Instruction (it works on the source machine) with the following stacktrace from gdb
:
Program received signal SIGILL, Illegal instruction.
...
(gdb) bt
#0 0x000000000093716b in std::vector<int, std::allocator<int> >::_M_fill_insert(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, unsigned long, int const&) ()
#1 0x0000000000706581 in _GLOBAL__sub_I__ZN5abcdf6kfjg446zcadetERKSs ()
#2 0x0000000000b2abad in __libc_csu_init ()
#3 0x00007ffff7106e55 in __libc_start_main (main=0x6fa390 <main>, argc=2, argv=0x7fffffffe668,
init=0xb2ab60 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe658)
at libc-start.c:246
#4 0x0000000000708437 in _start ()
What gives? It appears they are using the same versions of libc.